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) ⇒ GuardFailedError

Returns a new instance of GuardFailedError.



22
23
24
25
# File 'lib/statesman/exceptions.rb', line 22

def initialize(from, to)
  @from = from
  @to = to
end

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



27
28
29
# File 'lib/statesman/exceptions.rb', line 27

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



27
28
29
# File 'lib/statesman/exceptions.rb', line 27

def to
  @to
end

Instance Method Details

#messageObject



29
30
31
# File 'lib/statesman/exceptions.rb', line 29

def message
  "Guard on transition from: '#{from}' to '#{to}' returned false"
end