Class: Orchestrator::Subscription
- Inherits:
-
Struct
- Object
- Struct
- Orchestrator::Subscription
- Defined in:
- lib/orchestrator/status.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
Returns the value of attribute callback.
-
#index ⇒ Object
Returns the value of attribute index.
-
#mod_id ⇒ Object
Returns the value of attribute mod_id.
-
#mod_name ⇒ Object
Returns the value of attribute mod_name.
-
#on_thread ⇒ Object
Returns the value of attribute on_thread.
-
#status ⇒ Object
Returns the value of attribute status.
-
#sys_id ⇒ Object
Returns the value of attribute sys_id.
-
#sys_name ⇒ Object
Returns the value of attribute sys_name.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Subscription
constructor
A new instance of Subscription.
- #notify(update) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(*args) ⇒ Subscription
Returns a new instance of Subscription.
6 7 8 9 10 |
# File 'lib/orchestrator/status.rb', line 6 def initialize(*args) super(*args) @do_callback = method(:do_callback) end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def callback @callback end |
#index ⇒ Object
Returns the value of attribute index
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def index @index end |
#mod_id ⇒ Object
Returns the value of attribute mod_id
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def mod_id @mod_id end |
#mod_name ⇒ Object
Returns the value of attribute mod_name
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def mod_name @mod_name end |
#on_thread ⇒ Object
Returns the value of attribute on_thread
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def on_thread @on_thread end |
#status ⇒ Object
Returns the value of attribute status
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def status @status end |
#sys_id ⇒ Object
Returns the value of attribute sys_id
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def sys_id @sys_id end |
#sys_name ⇒ Object
Returns the value of attribute sys_name
5 6 7 |
# File 'lib/orchestrator/status.rb', line 5 def sys_name @sys_name end |
Instance Method Details
#notify(update) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/orchestrator/status.rb', line 12 def notify(update) if update != @last_update @last_update = update on_thread.schedule @do_callback end end |
#value ⇒ Object
19 20 21 |
# File 'lib/orchestrator/status.rb', line 19 def value @last_update end |