Exception: Cri::Parser::IllegalOptionValueError

Inherits:
Error
  • Object
show all
Defined in:
lib/cri/parser.rb

Overview

Error that will be raised when an option with an invalid or non-transformable value is encountered.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition, value) ⇒ IllegalOptionValueError

Returns a new instance of IllegalOptionValueError.



16
17
18
19
20
21
# File 'lib/cri/parser.rb', line 16

def initialize(definition, value)
  super("invalid value #{value.inspect} for #{definition.formatted_name} option")

  @value = value
  @definition = definition
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition.



13
14
15
# File 'lib/cri/parser.rb', line 13

def definition
  @definition
end

#valueObject (readonly)

Returns the value of attribute value.



14
15
16
# File 'lib/cri/parser.rb', line 14

def value
  @value
end