Class: Rivendell::Import::Notifiers
- Inherits:
-
Object
- Object
- Rivendell::Import::Notifiers
- Defined in:
- lib/rivendell/import/notifiers.rb
Instance Attribute Summary collapse
-
#import ⇒ Object
readonly
Returns the value of attribute import.
-
#notifiers ⇒ Object
readonly
Returns the value of attribute notifiers.
Instance Method Summary collapse
-
#initialize ⇒ Notifiers
constructor
A new instance of Notifiers.
- #notify! ⇒ Object
- #push(notifier) ⇒ Object
Constructor Details
#initialize ⇒ Notifiers
Returns a new instance of Notifiers.
6 7 8 |
# File 'lib/rivendell/import/notifiers.rb', line 6 def initialize @import = import end |
Instance Attribute Details
#import ⇒ Object (readonly)
Returns the value of attribute import.
4 5 6 |
# File 'lib/rivendell/import/notifiers.rb', line 4 def import @import end |
#notifiers ⇒ Object (readonly)
Returns the value of attribute notifiers.
4 5 6 |
# File 'lib/rivendell/import/notifiers.rb', line 4 def notifiers @notifiers end |
Instance Method Details
#notify! ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/rivendell/import/notifiers.rb', line 14 def notify! notified_tasks = waiting_tasks @waiting_tasks = [] notifiers.each do |notifier| notifier.notify notified_tasks end end |
#push(notifier) ⇒ Object
10 11 12 |
# File 'lib/rivendell/import/notifiers.rb', line 10 def push(notifier) notifiers << notifier end |