Module Hirb

  1. lib/hirb/console.rb
  2. lib/hirb/dynamic_view.rb
  3. lib/hirb/formatter.rb
  4. lib/hirb/helpers/table.rb
  5. lib/hirb/helpers.rb
  6. lib/hirb/import_object.rb
  7. lib/hirb/menu.rb
  8. lib/hirb/pager.rb
  9. lib/hirb/string.rb
  10. lib/hirb/util.rb
  11. lib/hirb/version.rb
  12. lib/hirb/view.rb
  13. lib/hirb/views.rb
  14. lib/hirb.rb
  15. show all

Most of Hirb’s functionality is in Hirb::View. For a tutorial on configuring and creating views see Hirb::View. For a tutorial on dynamic views see Hirb::DynamicView.

Config Files

Hirb can have multiple config files defined by config_files(). These config files have the following top level keys:

:output
This hash is used by the formatter object. See Hirb::Formatter.config for its format.
:width
Width of the terminal/console. Defaults to Hirb::View::DEFAULT_WIDTH or possibly autodetected when Hirb is enabled.
:height
Height of the terminal/console. Defaults to Hirb::View::DEFAULT_HEIGHT or possibly autodetected when Hirb is enabled.
:formatter
Boolean which determines if the formatter is enabled. Defaults to true.
:pager
Boolean which determines if the pager is enabled. Defaults to true.
:pager_command
Command to be used for paging. Command can have options after it i.e. ‘less -r’. Defaults to common pagers i.e. less and more if detected.

Classes and Modules

Module Hirb::Console
Module Hirb::DynamicView
Module Hirb::ObjectMethods
Module Hirb::String
Module Hirb::Util
Module Hirb::View
Module Hirb::Views
Class Hirb::Formatter
Class Hirb::Menu
Class Hirb::Pager

Constants

VERSION = '0.3.2'

Attributes

config [RW]
config_files [RW]

Public class methods

add_dynamic_view (view, options, &block)

Adds views. See Hirb::DynamicView.add for details.

[show source]
# File lib/hirb.rb, line 49
    def add_dynamic_view(view, options, &block)
      DynamicView.add(view, options, &block)
    end
add_view (view, options, &block)

Adds views. See Hirb::View.add for details.

[show source]
# File lib/hirb.rb, line 44
    def add_view(view, options, &block)
      View.add(view, options, &block)
    end
config_files ()

Array of config files which are merged sequentially to produce config. Defaults to config/hirb.yml and ~/.hirb_yml

[show source]
# File lib/hirb.rb, line 55
    def config_files
      @config_files ||= default_config_files
    end
disable ()

Disables view functionality. See Hirb::View.disable for details.

[show source]
# File lib/hirb.rb, line 39
    def disable
      View.disable
    end
enable (options={}, &block)

Enables view functionality. See Hirb::View.enable for details.

[show source]
# File lib/hirb.rb, line 34
    def enable(options={}, &block)
      View.enable(options, &block)
    end