Module: Boson::Commands::ViewCore
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/boson/commands/view_core.rb', line 4 def config commands = { 'render'=>{:desc=>"Render any object using Hirb"}, 'menu'=>{:desc=>"Provide a menu to multi-select elements from a given array"} } {:namespace=>false, :library_file=>File.(__FILE__), :commands=>commands} end |
#menu(arr, options = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/boson/commands/view_core.rb', line 16 def (arr, ={}, &block) Hirb::Console.format_output(arr, .merge(:class=>"Hirb::Menu"), &block) end |