Class: Tailnudge::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/tailnudge/notification.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ Notification

Returns a new instance of Notification.



9
10
11
# File 'lib/tailnudge/notification.rb', line 9

def initialize(result)
  @result = result
end

Class Method Details

.create(result) ⇒ Object



5
6
7
# File 'lib/tailnudge/notification.rb', line 5

def self.create(result)
  new(result).run
end

Instance Method Details

#runObject



13
14
15
16
# File 'lib/tailnudge/notification.rb', line 13

def run
  TerminalNotifier.notify(@result.message,
                          options)
end