Class: RgGen::Core::Options

Inherits:
Object show all
Extended by:
Forwardable
Defined in:
lib/rggen/core/options.rb

Defined Under Namespace

Classes: Option

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

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_argsObject (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_filesObject (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)
  options[option_name] = Option.new(option_name, &body)
end

.optionsObject



66
67
68
# File 'lib/rggen/core/options.rb', line 66

def self.options
  @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