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.16.1 lib/saucy/notifications.rb
saucy-0.16.0 lib/saucy/notifications.rb
saucy-0.15.2 lib/saucy/notifications.rb
saucy-0.15.1 lib/saucy/notifications.rb
saucy-0.15.0 lib/saucy/notifications.rb
saucy-0.14.5 lib/saucy/notifications.rb
saucy-0.14.3 lib/saucy/notifications.rb
saucy-0.10.10 lib/saucy/notifications.rb
saucy-0.14.2 lib/saucy/notifications.rb
saucy-0.14.1 lib/saucy/notifications.rb
saucy-0.14.0 lib/saucy/notifications.rb
saucy-0.13.3 lib/saucy/notifications.rb
saucy-0.13.2 lib/saucy/notifications.rb
saucy-0.10.9 lib/saucy/notifications.rb
saucy-0.10.8 lib/saucy/notifications.rb
saucy-0.13.1 lib/saucy/notifications.rb
saucy-0.13.0 lib/saucy/notifications.rb
saucy-0.12.5 lib/saucy/notifications.rb
saucy-0.12.4 lib/saucy/notifications.rb
saucy-0.12.3 lib/saucy/notifications.rb