Class: Lita::Handlers::GitHubWebHooks::Hook

Inherits:
Object
  • Object
show all
Defined in:
lib/lita/handlers/github_web_hooks/hook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(robot, payload) ⇒ Hook

Returns a new instance of Hook.



6
7
8
9
# File 'lib/lita/handlers/github_web_hooks/hook.rb', line 6

def initialize(robot, payload)
  @robot = robot
  @payload = payload
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



4
5
6
# File 'lib/lita/handlers/github_web_hooks/hook.rb', line 4

def payload
  @payload
end

#robotObject (readonly)

Returns the value of attribute robot.



4
5
6
# File 'lib/lita/handlers/github_web_hooks/hook.rb', line 4

def robot
  @robot
end

Instance Method Details

#callObject



11
12
13
# File 'lib/lita/handlers/github_web_hooks/hook.rb', line 11

def call
  targets.each { |target| robot.send_message(target, message) }
end