Sha256: 9f08ef22cd1abc9b1703cafd58f24eeba50f452f50dc7d2d6c6df777e94c8df5

Contents?: true

Size: 398 Bytes

Versions: 36

Compression:

Stored size: 398 Bytes

Contents

require 'saucy/layouts'

module Saucy
  module Notifications
    @@observers = []

    def self.clear_observers
      @@observers = []
    end

    def self.register_observer(observer)
      @@observers << observer
    end

    def self.notify_observers(event, data)
      @@observers.each do |observer|
        observer.send(event, data) if observer.respond_to?(event)
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
saucy-0.12.2 lib/saucy/notifications.rb
saucy-0.12.1 lib/saucy/notifications.rb
saucy-0.12.0 lib/saucy/notifications.rb
saucy-0.11.5 lib/saucy/notifications.rb
saucy-0.11.3 lib/saucy/notifications.rb
saucy-0.11.2 lib/saucy/notifications.rb
saucy-0.10.7 lib/saucy/notifications.rb
saucy-0.10.6 lib/saucy/notifications.rb
saucy-0.10.5 lib/saucy/notifications.rb
saucy-0.10.4 lib/saucy/notifications.rb
saucy-0.10.3 lib/saucy/notifications.rb
saucy-0.10.2 lib/saucy/notifications.rb
saucy-0.10.1 lib/saucy/notifications.rb
saucy-0.10.0 lib/saucy/notifications.rb
saucy-0.9.1 lib/saucy/notifications.rb
saucy-0.9.0 lib/saucy/notifications.rb