Class: Github::IssueCommentEvent
- Inherits:
-
CommentEvent
- Object
- Event
- CommentEvent
- Github::IssueCommentEvent
- Defined in:
- app/models/github/issue_comment_event.rb
Instance Attribute Summary
Attributes inherited from CommentEvent
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(payload) ⇒ IssueCommentEvent
constructor
A new instance of IssueCommentEvent.
- #type ⇒ Object
Methods inherited from CommentEvent
Methods inherited from Event
Constructor Details
#initialize(payload) ⇒ IssueCommentEvent
Returns a new instance of IssueCommentEvent.
6 7 8 9 |
# File 'app/models/github/issue_comment_event.rb', line 6 def initialize(payload) super comment["issue"] = payload.fetch "issue" end |
Instance Method Details
#type ⇒ Object
11 12 13 |
# File 'app/models/github/issue_comment_event.rb', line 11 def type @type ||= payload["issue"]["pull_request"] ? "pull" : "issue" end |