Class: HubLink::Api::Review
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- HubLink::Api::Review
- Defined in:
- lib/hub_link/api/review.rb
Constant Summary collapse
- EXPORT_COLUMNS =
%i( id pull_request_id submitted_at reviewer reply? state html_url body review_comments_count )
Instance Method Summary collapse
- #reply? ⇒ Boolean
- #review_comments_count ⇒ Object
- #reviewer ⇒ Object
- #submitted_at ⇒ Object
- #to_h ⇒ Object
Instance Method Details
#reply? ⇒ Boolean
20 21 22 |
# File 'lib/hub_link/api/review.rb', line 20 def reply? reviewer == submitter end |
#review_comments_count ⇒ Object
30 31 32 |
# File 'lib/hub_link/api/review.rb', line 30 def review_comments_count review_comments.size end |
#reviewer ⇒ Object
16 17 18 |
# File 'lib/hub_link/api/review.rb', line 16 def reviewer user&.login end |
#submitted_at ⇒ Object
24 25 26 27 28 |
# File 'lib/hub_link/api/review.rb', line 24 def submitted_at if submitted? super end end |
#to_h ⇒ Object
34 35 36 |
# File 'lib/hub_link/api/review.rb', line 34 def to_h Slicer.new(self, columns: EXPORT_COLUMNS).to_h end |