Class: FloorManager::Result
- Inherits:
- BasicObject
- Defined in:
- lib/floormanager/result.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
Returns the value of attribute result.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(result, state = States::SUCCESS) ⇒ Result
constructor
A new instance of Result.
- #method_missing(name, *args, &block) ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(result, state = States::SUCCESS) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/floormanager/result.rb', line 5 def initialize(result, state=States::SUCCESS) @result = result @state = state end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
10 11 12 |
# File 'lib/floormanager/result.rb', line 10 def method_missing(name, *args, &block) @result.send(name, *args, &block) end |
Instance Attribute Details
#result ⇒ Object
Returns the value of attribute result.
3 4 5 |
# File 'lib/floormanager/result.rb', line 3 def result @result end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/floormanager/result.rb', line 3 def state @state end |