Class: Boson::Command

Inherits:
Object
  • Object
show all
Extended by:
NamespacerClass, ScienceClassMethods
Includes:
Libraries, MoreMethodInspector, Namespacer, Save, Science
Defined in:
lib/boson/science.rb,
lib/boson/save.rb,
lib/boson/science.rb,
lib/boson/libraries.rb,
lib/boson/namespacer.rb,
lib/boson/more_method_inspector.rb

Overview

:render_options

Hash of rendering options to pass to OptionParser. If the key :output_class is passed, that class’s Hirb config will serve as defaults for this rendering hash.

Defined Under Namespace

Modules: Libraries, MoreMethodInspector, Namespacer, NamespacerClass, Save, Science, ScienceClassMethods

Instance Attribute Summary collapse

Attributes included from ScienceClassMethods

#all_option_commands

Attributes included from Namespacer

#namespace

Instance Method Summary collapse

Methods included from ScienceClassMethods

create

Methods included from NamespacerClass

find, library_attributes

Methods included from MoreMethodInspector

#basic_usage, #option_help, #usage

Methods included from Namespacer

#full_name

Methods included from Libraries

#file_string_and_method_for_args

Methods included from Science

#after_initialize, #make_option_command, #option_command?, #render_option_parser

Methods included from Save

#marshal_dump, #marshal_load

Instance Attribute Details

#render_optionsObject

Returns the value of attribute render_options.



199
200
201
# File 'lib/boson/science.rb', line 199

def render_options
  @render_options
end

Instance Method Details

#args(lib = library) ⇒ Object

hack: have to override Array of array args with optional defaults. Scraped with MethodInspector



133
134
135
136
137
138
139
140
141
# File 'lib/boson/libraries.rb', line 133

def args(lib=library)
  @args = !@args.nil? ? @args : begin
    if lib
      file_string, meth = file_string_and_method_for_args(lib)
      (file_string && meth && (@file_parsed_args = true) &&
        MethodInspector.scrape_arguments(file_string, meth))
    end || false
  end
end