Class: Ramaze::Growl
Overview
Informer for the growl notification system on OSX.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Growl
constructor
Takes the options from the default trait for merging.
-
#log(tag, *args) ⇒ Object
integration to Logging.
Constructor Details
#initialize(options = {}) ⇒ Growl
Takes the options from the default trait for merging.
22 23 24 25 |
# File 'lib/ramaze/log/growl.rb', line 22 def initialize( = {}) = class_trait[:defaults].merge().values_at(:host, :name, :all_notifies, :default_notifies, :password) super(*) end |
Instance Method Details
#log(tag, *args) ⇒ Object
integration to Logging
29 30 31 32 33 |
# File 'lib/ramaze/log/growl.rb', line 29 def log(tag, *args) notify(tag.to_s, Time.now.strftime("%X"), args.join("\n")[0..100]) rescue Errno::EMSGSIZE # Send size was to big (not really), ignore end |