Class: RgGen::Core::InputBase::OptionHashParser

Inherits:
InputValueParser show all
Defined in:
lib/rggen/core/input_base/option_hash_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(exception, allowed_options: nil, multiple_values: false) ⇒ OptionHashParser

Returns a new instance of OptionHashParser.



7
8
9
10
11
# File 'lib/rggen/core/input_base/option_hash_parser.rb', line 7

def initialize(exception, allowed_options: nil, multiple_values: false)
  super
  @allowed_options = allowed_options
  @multiple_values = multiple_values
end

Instance Method Details

#parse(input_value) ⇒ Object



13
14
15
16
17
# File 'lib/rggen/core/input_base/option_hash_parser.rb', line 13

def parse(input_value)
  values, options = parse_input_value(input_value)
  check_result(values, options, input_value)
  pack_result(values, options)
end