Sha256: c06cabc9f2a1579da2e651e331260ff4566c9440a6d3487b66b7ca963c7dde7e

Contents?: true

Size: 528 Bytes

Versions: 6

Compression:

Stored size: 528 Bytes

Contents

module Boson::Commands::ViewCore
  extend self

  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.expand_path(__FILE__), :commands=>commands}
  end

  def render(object, options={})
    Boson::View.render(object, options)
  end

  def menu(arr, options={}, &block)
    Hirb::Console.format_output(arr, options.merge(:class=>"Hirb::Menu"), &block)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
boson-more-0.3.1 lib/boson/commands/view_core.rb
boson-more-0.3.0 lib/boson/commands/view_core.rb
boson-more-0.2.2 lib/boson/commands/view_core.rb
boson-more-0.2.1 lib/boson/commands/view_core.rb
boson-more-0.2.0 lib/boson/commands/view_core.rb
boson-more-0.1.0 lib/boson/commands/view_core.rb