Exception: Ruote::Reader::Error
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Ruote::Reader::Error
- Defined in:
- lib/ruote/reader.rb
Overview
This error is emitted by the reader when it failed to read a process definition (passed as a string).
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#radial ⇒ Object
readonly
Returns the value of attribute radial.
-
#ruby ⇒ Object
readonly
Returns the value of attribute ruby.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #<<(args) ⇒ Object
-
#cause ⇒ Object
Returns the most likely error cause…
-
#initialize(definition) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
Constructor Details
#initialize(definition) ⇒ Error
Returns a new instance of Error.
53 54 55 |
# File 'lib/ruote/reader.rb', line 53 def initialize(definition) @definition = definition end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
50 51 52 |
# File 'lib/ruote/reader.rb', line 50 def definition @definition end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
51 52 53 |
# File 'lib/ruote/reader.rb', line 51 def json @json end |
#radial ⇒ Object (readonly)
Returns the value of attribute radial.
51 52 53 |
# File 'lib/ruote/reader.rb', line 51 def radial @radial end |
#ruby ⇒ Object (readonly)
Returns the value of attribute ruby.
51 52 53 |
# File 'lib/ruote/reader.rb', line 51 def ruby @ruby end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
51 52 53 |
# File 'lib/ruote/reader.rb', line 51 def xml @xml end |
Instance Method Details
#<<(args) ⇒ Object
57 58 59 60 61 |
# File 'lib/ruote/reader.rb', line 57 def <<(args) type, error = args type = type.to_s.match(/^Ruote::(.+)Reader$/)[1].downcase instance_variable_set("@#{type}", error) end |
#cause ⇒ Object
Returns the most likely error cause…
65 66 67 |
# File 'lib/ruote/reader.rb', line 65 def cause @ruby || @radial || @xml || @json end |
#inspect ⇒ Object
69 70 71 72 73 74 |
# File 'lib/ruote/reader.rb', line 69 def inspect s = "#<#{self.class}: " [ @ruby, @radial, @xml, @json ].each { |e| s << e.inspect; s << ' ' } s << '>' s end |