Class: Ramaze::Growl

Inherits:
Growl show all
Defined in:
lib/ramaze/log/growl.rb

Overview

Informer for the growl notification system on OSX.

Instance Method Summary collapse

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(options = {})
  options = class_trait[:defaults].merge(options).values_at(:host, :name, :all_notifies, :default_notifies, :password)
  super(*options)
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