Exception: Ruote::Reader::Error

Inherits:
ArgumentError
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(definition) ⇒ Error

Returns a new instance of Error


53
54
55
56
# File 'lib/ruote/reader.rb', line 53

def initialize(definition)
  super('cannot read process definition')
  @definition = definition
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition


50
51
52
# File 'lib/ruote/reader.rb', line 50

def definition
  @definition
end

#jsonObject (readonly)

Returns the value of attribute json


51
52
53
# File 'lib/ruote/reader.rb', line 51

def json
  @json
end

#radialObject (readonly)

Returns the value of attribute radial


51
52
53
# File 'lib/ruote/reader.rb', line 51

def radial
  @radial
end

#rubyObject (readonly)

Returns the value of attribute ruby


51
52
53
# File 'lib/ruote/reader.rb', line 51

def ruby
  @ruby
end

#xmlObject (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


58
59
60
61
62
# File 'lib/ruote/reader.rb', line 58

def <<(args)
  type, error = args
  type = type.to_s.match(/^Ruote::(.+)Reader$/)[1].downcase
  instance_variable_set("@#{type}", error)
end

#causeObject

Returns the most likely error cause…


66
67
68
# File 'lib/ruote/reader.rb', line 66

def cause
  @ruby || @radial || @xml || @json
end