Class: Notification::Wall

Inherits:
Object
  • Object
show all
Defined in:
lib/gaddygaddy-client/notification/wall.rb

Class Method Summary collapse

Class Method Details

.notify(event, message_text) ⇒ Object



18
19
20
21
22
# File 'lib/gaddygaddy-client/notification/wall.rb', line 18

def self.notify(event, message_text)
  if wall?
    systemu("echo 'Gaddy says: #{message_text}'|wall")
  end
end

.wall?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/gaddygaddy-client/notification/wall.rb', line 14

def self.wall?
  `whereis wall`.index('bin')
end