Module | Hirb::Console |
In: |
lib/hirb/console.rb
|
This module is meant to be extended to provide methods for use in a console/irb shell. For example:
>> extend Hirb::Console >> view 'some string', :class=>Some::String::Formatter >> table [[:row1], [:row2]]
Takes same arguments and options as render_output() but returns formatted output instead of rendering it.
A console version of render_output() which takes its same options but allows for shorthand. All options are passed to the helper except for the formatter options. Formatter options are :class, :method and :output_method. Examples:
render_output output, :class=>:tree :type=>:directory # is the same as: render_output output, :class=>:tree, :options=> {:type=>:directory}
Renders a table for the given object. Takes same options as Hirb::Helpers::Table.render.
Renders any specified view for the given object. Takes same options as Hirb::View.render_output.