Class: Ninjs::Notification
- Inherits:
-
Object
- Object
- Ninjs::Notification
- Defined in:
- lib/ninjs/notification.rb
Constant Summary collapse
- @@growl_support =
false
- @@indicators =
{ none: "", log: "\e[32m>>>\e[0m ", event: "\e[33m<<<\e[0m ", added: "\e[32m+++\e[0m ", error: "\e[0;31m!!!\e[0m " }
Class Method Summary collapse
- .added(message) ⇒ Object
- .error(message) ⇒ Object
- .event(message) ⇒ Object
- .log(message) ⇒ Object
- .notice(message) ⇒ Object
- .notify(message, style) ⇒ Object
Class Method Details
.added(message) ⇒ Object
28 29 30 |
# File 'lib/ninjs/notification.rb', line 28 def self.added() self.notify(, :added) end |
.error(message) ⇒ Object
32 33 34 |
# File 'lib/ninjs/notification.rb', line 32 def self.error() self.notify(, :error) end |
.event(message) ⇒ Object
24 25 26 |
# File 'lib/ninjs/notification.rb', line 24 def self.event() self.notify(, :event) end |
.log(message) ⇒ Object
20 21 22 |
# File 'lib/ninjs/notification.rb', line 20 def self.log() self.notify(, :log) end |
.notice(message) ⇒ Object
16 17 18 |
# File 'lib/ninjs/notification.rb', line 16 def self.notice() self.notify(, :none) end |
.notify(message, style) ⇒ Object
12 13 14 |
# File 'lib/ninjs/notification.rb', line 12 def self.notify(, style) @@indicators[style] + end |