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, object = nil) ⇒ GuardFailedError

Returns a new instance of GuardFailedError.



33
34
35
36
37
38
39
40
# File 'lib/statesman/exceptions.rb', line 33

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

Instance Attribute Details

#callbackObject (readonly)

Returns the value of attribute callback.



42
43
44
# File 'lib/statesman/exceptions.rb', line 42

def callback
  @callback
end

#fromObject (readonly)

Returns the value of attribute from.



42
43
44
# File 'lib/statesman/exceptions.rb', line 42

def from
  @from
end

#objectObject (readonly)

Returns the value of attribute object.



42
43
44
# File 'lib/statesman/exceptions.rb', line 42

def object
  @object
end

#toObject (readonly)

Returns the value of attribute to.



42
43
44
# File 'lib/statesman/exceptions.rb', line 42

def to
  @to
end