Module: Notifyor::Growl
- Extended by:
- Growl
- Included in:
- Growl
- Defined in:
- lib/notifyor/growl.rb,
lib/notifyor/growl/adapters/terminal_notifier.rb
Defined Under Namespace
Modules: Adapters
Instance Method Summary collapse
Instance Method Details
#adapter ⇒ Object
5 6 7 8 9 |
# File 'lib/notifyor/growl.rb', line 5 def adapter return @adapter if @adapter self.adapter = :terminal_notifier @adapter end |
#adapter=(adapter_name) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/notifyor/growl.rb', line 11 def adapter=(adapter_name) case adapter_name when Symbol, String require "notifyor/growl/adapters/#{adapter_name}" @adapter = Notifyor::Growl::Adapters.const_get("#{adapter_name.to_s.split('_').collect(&:capitalize).join}") else raise "Missing adapter #{adapter_name}" end end |
#create_growl(title, message) ⇒ Object
21 22 23 |
# File 'lib/notifyor/growl.rb', line 21 def create_growl(title, ) adapter.create_growl(title, ) end |