Class: Nestene::AutonState
- Inherits:
-
Object
- Object
- Nestene::AutonState
- Includes:
- StructureMapper::Hash
- Defined in:
- lib/nestene/auton_state.rb
Instance Method Summary collapse
-
#initialize ⇒ AutonState
constructor
A new instance of AutonState.
- #state ⇒ Object
- #type_as_class ⇒ Object
Constructor Details
#initialize ⇒ AutonState
Returns a new instance of AutonState.
6 7 8 |
# File 'lib/nestene/auton_state.rb', line 6 def initialize self.queue=AutonExecutionQueue.new end |
Instance Method Details
#state ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/nestene/auton_state.rb', line 10 def state if queue.currently_executing == nil queue.failed ? :failed : :ready else :running end end |
#type_as_class ⇒ Object
22 23 24 |
# File 'lib/nestene/auton_state.rb', line 22 def type_as_class self.type ? Nestene::class_from_string(self.type) : nil end |