Class: RgGen::Core::Options
- Extended by:
- Forwardable
- Defined in:
- lib/rggen/core/options.rb
Defined Under Namespace
Classes: Option
Instance Attribute Summary collapse
-
#original_args ⇒ Object
readonly
Returns the value of attribute original_args.
-
#register_map_files ⇒ Object
readonly
Returns the value of attribute register_map_files.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #parse(args) ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
74 75 76 |
# File 'lib/rggen/core/options.rb', line 74 def initialize @options = {} end |
Instance Attribute Details
#original_args ⇒ Object (readonly)
Returns the value of attribute original_args.
78 79 80 |
# File 'lib/rggen/core/options.rb', line 78 def original_args @original_args end |
#register_map_files ⇒ Object (readonly)
Returns the value of attribute register_map_files.
79 80 81 |
# File 'lib/rggen/core/options.rb', line 79 def register_map_files @register_map_files end |
Class Method Details
.add_option(option_name, &body) ⇒ Object
70 71 72 |
# File 'lib/rggen/core/options.rb', line 70 def self.add_option(option_name, &body) [option_name] = Option.new(option_name, &body) end |
.options ⇒ Object
66 67 68 |
# File 'lib/rggen/core/options.rb', line 66 def self. @options ||= {} end |
Instance Method Details
#parse(args) ⇒ Object
83 84 85 86 |
# File 'lib/rggen/core/options.rb', line 83 def parse(args) @original_args = args @register_map_files = option_parser.parse(args) end |