Class: Chaintown::State
- Inherits:
-
Object
- Object
- Chaintown::State
- Defined in:
- lib/chaintown/state.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
Returns the value of attribute result.
-
#valid ⇒ Object
(also: #valid?)
Returns the value of attribute valid.
Instance Method Summary collapse
- #failed(result) ⇒ Object
-
#initialize ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize ⇒ State
Returns a new instance of State.
6 7 8 |
# File 'lib/chaintown/state.rb', line 6 def initialize @valid = true end |
Instance Attribute Details
#result ⇒ Object
Returns the value of attribute result.
3 4 5 |
# File 'lib/chaintown/state.rb', line 3 def result @result end |
#valid ⇒ Object Also known as: valid?
Returns the value of attribute valid.
3 4 5 |
# File 'lib/chaintown/state.rb', line 3 def valid @valid end |
Instance Method Details
#failed(result) ⇒ Object
10 11 12 13 |
# File 'lib/chaintown/state.rb', line 10 def failed(result) @valid = false @result = result end |