Class: Chaintown::State

Inherits:
Object
  • Object
show all
Defined in:
lib/chaintown/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeState

Returns a new instance of State.



6
7
8
# File 'lib/chaintown/state.rb', line 6

def initialize
  @valid = true
end

Instance Attribute Details

#resultObject

Returns the value of attribute result.



3
4
5
# File 'lib/chaintown/state.rb', line 3

def result
  @result
end

#validObject 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