Class: Statefully::State::Failure
Overview
Failure is a failed State.
Instance Attribute Summary collapse
#previous
Instance Method Summary
collapse
create, #history
Constructor Details
#initialize(values, error, previous:) ⇒ Failure
107
108
109
110
|
# File 'lib/statefully/state.rb', line 107
def initialize(values, error, previous:)
super(values, previous: previous)
@error = error
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Statefully::State
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
105
106
107
|
# File 'lib/statefully/state.rb', line 105
def error
@error
end
|
Instance Method Details
#diff ⇒ Object
112
113
114
|
# File 'lib/statefully/state.rb', line 112
def diff
error
end
|
#inspect ⇒ Object
124
125
126
|
# File 'lib/statefully/state.rb', line 124
def inspect
inspect_details(error: error.inspect)
end
|
#resolve ⇒ Object
120
121
122
|
# File 'lib/statefully/state.rb', line 120
def resolve
raise error
end
|
#success? ⇒ Boolean
116
117
118
|
# File 'lib/statefully/state.rb', line 116
def success?
false
end
|