Class: Github::CommentEvent
- Defined in:
- app/models/github/comment_event.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.type ⇒ Object
Returns the value of attribute type.
Instance Attribute Summary collapse
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from Event
Instance Method Summary collapse
Methods inherited from Event
Constructor Details
#initialize(payload) ⇒ CommentEvent
16 17 18 19 20 |
# File 'app/models/github/comment_event.rb', line 16 def initialize(payload) super @comment = payload.fetch "comment" comment["project"] = Project.find_by_slug payload["repository"]["name"] end |
Class Attribute Details
.type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'app/models/github/comment_event.rb', line 8 def type @type end |
Instance Attribute Details
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
5 6 7 |
# File 'app/models/github/comment_event.rb', line 5 def comment @comment end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
5 6 7 |
# File 'app/models/github/comment_event.rb', line 5 def project @project end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'app/models/github/comment_event.rb', line 5 def user @user end |