Class: Ghub::Models::Review
- Inherits:
-
Struct
- Object
- Struct
- Ghub::Models::Review
- Defined in:
- lib/ghub/models/review.rb
Overview
Defines a review.
Instance Attribute Summary collapse
-
#dismiss_stale_reviews ⇒ Object
Returns the value of attribute dismiss_stale_reviews.
-
#dismissal_restrictions ⇒ Object
Returns the value of attribute dismissal_restrictions.
-
#require_code_owner_reviews ⇒ Object
Returns the value of attribute require_code_owner_reviews.
-
#required_approving_review_count ⇒ Object
Returns the value of attribute required_approving_review_count.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Review
constructor
A new instance of Review.
Constructor Details
#initialize ⇒ Review
Returns a new instance of Review.
23 24 25 26 |
# File 'lib/ghub/models/review.rb', line 23 def initialize(**) super freeze end |
Instance Attribute Details
#dismiss_stale_reviews ⇒ Object
Returns the value of attribute dismiss_stale_reviews
6 7 8 |
# File 'lib/ghub/models/review.rb', line 6 def dismiss_stale_reviews @dismiss_stale_reviews end |
#dismissal_restrictions ⇒ Object
Returns the value of attribute dismissal_restrictions
6 7 8 |
# File 'lib/ghub/models/review.rb', line 6 def dismissal_restrictions @dismissal_restrictions end |
#require_code_owner_reviews ⇒ Object
Returns the value of attribute require_code_owner_reviews
6 7 8 |
# File 'lib/ghub/models/review.rb', line 6 def require_code_owner_reviews @require_code_owner_reviews end |
#required_approving_review_count ⇒ Object
Returns the value of attribute required_approving_review_count
6 7 8 |
# File 'lib/ghub/models/review.rb', line 6 def required_approving_review_count @required_approving_review_count end |
#url ⇒ Object
Returns the value of attribute url
6 7 8 |
# File 'lib/ghub/models/review.rb', line 6 def url @url end |
Class Method Details
.for(**attributes) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/ghub/models/review.rb', line 13 def self.for(**attributes) return new if attributes.empty? new( **attributes.merge!( dismissal_restrictions: DismissalRestriction.for(**attributes[:dismissal_restrictions]) ) ) end |