Exception: Statesman::GuardFailedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/statesman/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to, callback) ⇒ GuardFailedError

Returns a new instance of GuardFailedError.



31
32
33
34
35
36
37
# File 'lib/statesman/exceptions.rb', line 31

def initialize(from, to, callback)
  @from = from
  @to = to
  @callback = callback
  super(_message)
  set_backtrace(callback.source_location.join(":")) if callback&.source_location
end

Instance Attribute Details

#callbackObject (readonly)

Returns the value of attribute callback.



39
40
41
# File 'lib/statesman/exceptions.rb', line 39

def callback
  @callback
end

#fromObject (readonly)

Returns the value of attribute from.



39
40
41
# File 'lib/statesman/exceptions.rb', line 39

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



39
40
41
# File 'lib/statesman/exceptions.rb', line 39

def to
  @to
end