Class: Lita::Handlers::GitHubWebHooks::Hook
- Inherits:
-
Object
- Object
- Lita::Handlers::GitHubWebHooks::Hook
- Defined in:
- lib/lita/handlers/github_web_hooks/hook.rb
Direct Known Subclasses
CommitComment, Create, Delete, Deployment, DeploymentStatus, Download, Follow, Fork, ForkApply, Gist, Gollum, IssueComment, Issues, Member, Ping, Public, PullRequest, PullRequestReviewComment, Push, Release, Status, TeamAdd, Watch
Instance Attribute Summary collapse
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(robot, payload) ⇒ Hook
constructor
A new instance of Hook.
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
#payload ⇒ Object (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 |
#robot ⇒ Object (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
#call ⇒ Object
11 12 13 |
# File 'lib/lita/handlers/github_web_hooks/hook.rb', line 11 def call targets.each { |target| robot.(target, ) } end |