Class: Watchcat::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/watchcat/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ Server

Returns a new instance of Server.



5
6
7
# File 'lib/watchcat/server.rb', line 5

def initialize(block)
  @block = block
end

Instance Method Details

#execute(notification) ⇒ Object



9
10
11
12
# File 'lib/watchcat/server.rb', line 9

def execute(notification)
  event = Watchcat::Event.new(notification[0], notification[1], notification[2])
  @block.call(event)
end