Class: Ghub::Endpoints::Branches::Protection::Models::Show
- Inherits:
-
Struct
- Object
- Struct
- Ghub::Endpoints::Branches::Protection::Models::Show
- Defined in:
- lib/ghub/endpoints/branches/protection/models/show.rb
Overview
Defines branch protection.
Instance Attribute Summary collapse
-
#allow_deletions ⇒ Object
Returns the value of attribute allow_deletions.
-
#allow_force_pushes ⇒ Object
Returns the value of attribute allow_force_pushes.
-
#block_creations ⇒ Object
Returns the value of attribute block_creations.
-
#enforce_admins ⇒ Object
Returns the value of attribute enforce_admins.
-
#required_conversation_resolution ⇒ Object
Returns the value of attribute required_conversation_resolution.
-
#required_linear_history ⇒ Object
Returns the value of attribute required_linear_history.
-
#required_pull_request_reviews ⇒ Object
Returns the value of attribute required_pull_request_reviews.
-
#required_signatures ⇒ Object
Returns the value of attribute required_signatures.
-
#required_status_checks ⇒ Object
Returns the value of attribute required_status_checks.
-
#restrictions ⇒ Object
Returns the value of attribute restrictions.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Show
constructor
A new instance of Show.
Constructor Details
#initialize ⇒ Show
Returns a new instance of Show.
40 41 42 43 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 40 def initialize(**) super freeze end |
Instance Attribute Details
#allow_deletions ⇒ Object
Returns the value of attribute allow_deletions
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def allow_deletions @allow_deletions end |
#allow_force_pushes ⇒ Object
Returns the value of attribute allow_force_pushes
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def allow_force_pushes @allow_force_pushes end |
#block_creations ⇒ Object
Returns the value of attribute block_creations
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def block_creations @block_creations end |
#enforce_admins ⇒ Object
Returns the value of attribute enforce_admins
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def enforce_admins @enforce_admins end |
#required_conversation_resolution ⇒ Object
Returns the value of attribute required_conversation_resolution
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def required_conversation_resolution @required_conversation_resolution end |
#required_linear_history ⇒ Object
Returns the value of attribute required_linear_history
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def required_linear_history @required_linear_history end |
#required_pull_request_reviews ⇒ Object
Returns the value of attribute required_pull_request_reviews
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def required_pull_request_reviews @required_pull_request_reviews end |
#required_signatures ⇒ Object
Returns the value of attribute required_signatures
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def required_signatures @required_signatures end |
#required_status_checks ⇒ Object
Returns the value of attribute required_status_checks
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def required_status_checks @required_status_checks end |
#restrictions ⇒ Object
Returns the value of attribute restrictions
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def restrictions @restrictions end |
#url ⇒ Object
Returns the value of attribute url
9 10 11 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 9 def url @url end |
Class Method Details
.for(**attributes) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ghub/endpoints/branches/protection/models/show.rb', line 22 def self.for(**attributes) new( **attributes.merge!( enforce_admins: Ghub::Models::BooleanLink[**attributes[:enforce_admins]], required_signatures: Ghub::Models::BooleanLink[ **Hash(attributes[:required_signatures]) ], required_status_checks: Ghub::Models::StatusCheck.for( **Hash(attributes[:required_status_checks]) ), required_pull_request_reviews: Ghub::Models::Review.for( **Hash(attributes[:required_pull_request_reviews]) ), restrictions: Ghub::Models::Restriction.for(**Hash(attributes[:restrictions])) ) ) end |