Class: Magellan::Gcs::Proxy::ProgressNotification::CompositeNotifier

Inherits:
Object
  • Object
show all
Defined in:
lib/magellan/gcs/proxy/progress_notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notifiers) ⇒ CompositeNotifier

Returns a new instance of CompositeNotifier.



56
57
58
# File 'lib/magellan/gcs/proxy/progress_notification.rb', line 56

def initialize(notifiers)
  @notifiers = notifiers
end

Instance Attribute Details

#notifiersObject (readonly)

Returns the value of attribute notifiers.



55
56
57
# File 'lib/magellan/gcs/proxy/progress_notification.rb', line 55

def notifiers
  @notifiers
end

Instance Method Details

#notify(*args, &block) ⇒ Object



60
61
62
63
64
65
66
67
68
# File 'lib/magellan/gcs/proxy/progress_notification.rb', line 60

def notify(*args, &block)
  notifiers.each do |notifier|
    begin
      notifier.notify(*args, &block)
    rescue => e
      $stderr.puts("[#{e.class}] #{e.message}")
    end
  end
end