Sha256: f93338ddf5172f8c488b0c9cbefff305040cb67cc659bb7d89ed2195b64c12bb
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
require "hermes/railtie" if defined?(Rails::Railtie) module Hermes module Notifiers end mattr_reader :notifiers @@notifiers = [] mattr_reader :hooks @@hooks = [:attr_protected] def self.notify(message) notifiers.each { |notifier| notifier.call(message) } end def self.setup! setup_notifiers! setup_hooks! end protected def self.setup_hooks! hooks.each { |hook| require "hermes/hooks/#{hook}" } end def self.setup_notifiers! case RUBY_PLATFORM when /darwin/ require "hermes/notifiers/growl" else warn "Hermes only supports MacOSX using Growl. Want to support other OS? Fork it!" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hermes-0.1.0 | lib/hermes.rb |