Class: Dynflow::Coordinator::ExecutorWorld
- Inherits:
-
WorldRecord
- Object
- Serializable
- Record
- WorldRecord
- Dynflow::Coordinator::ExecutorWorld
- Defined in:
- lib/dynflow/coordinator.rb
Constant Summary
Constants inherited from Serializable
Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT
Instance Attribute Summary
Attributes inherited from Record
Instance Method Summary collapse
- #active=(value) ⇒ Object
- #active? ⇒ Boolean
- #executor? ⇒ Boolean
-
#initialize(world) ⇒ ExecutorWorld
constructor
A new instance of ExecutorWorld.
Methods inherited from WorldRecord
Methods inherited from Record
#==, constantize, #from_hash, #hash, #id, new_from_hash, #to_hash, #to_s, #validate!
Methods inherited from Serializable
constantize, from_hash, new_from_hash, #to_hash
Constructor Details
#initialize(world) ⇒ ExecutorWorld
Returns a new instance of ExecutorWorld.
100 101 102 103 |
# File 'lib/dynflow/coordinator.rb', line 100 def initialize(world) super self.active = !world.terminating? end |
Instance Method Details
#active=(value) ⇒ Object
109 110 111 112 |
# File 'lib/dynflow/coordinator.rb', line 109 def active=(value) Type! value, Algebrick::Types::Boolean @data[:active] = value end |
#active? ⇒ Boolean
105 106 107 |
# File 'lib/dynflow/coordinator.rb', line 105 def active? @data[:active] end |
#executor? ⇒ Boolean
114 115 116 |
# File 'lib/dynflow/coordinator.rb', line 114 def executor? true end |