Class: Ghub::Models::DismissalRestriction
- Inherits:
-
Struct
- Object
- Struct
- Ghub::Models::DismissalRestriction
- Defined in:
- lib/ghub/models/dismissal_restriction.rb
Overview
Defines a dismissal restriction.
Instance Attribute Summary collapse
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#teams ⇒ Object
Returns the value of attribute teams.
-
#teams_url ⇒ Object
Returns the value of attribute teams_url.
-
#url ⇒ Object
Returns the value of attribute url.
-
#users ⇒ Object
Returns the value of attribute users.
-
#users_url ⇒ Object
Returns the value of attribute users_url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DismissalRestriction
constructor
A new instance of DismissalRestriction.
Constructor Details
#initialize ⇒ DismissalRestriction
Returns a new instance of DismissalRestriction.
26 27 28 29 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 26 def initialize(**) super freeze end |
Instance Attribute Details
#apps ⇒ Object
Returns the value of attribute apps
6 7 8 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 6 def apps @apps end |
#teams ⇒ Object
Returns the value of attribute teams
6 7 8 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 6 def teams @teams end |
#teams_url ⇒ Object
Returns the value of attribute teams_url
6 7 8 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 6 def teams_url @teams_url end |
#url ⇒ Object
Returns the value of attribute url
6 7 8 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 6 def url @url end |
#users ⇒ Object
Returns the value of attribute users
6 7 8 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 6 def users @users end |
#users_url ⇒ Object
Returns the value of attribute users_url
6 7 8 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 6 def users_url @users_url end |
Class Method Details
.for(**attributes) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ghub/models/dismissal_restriction.rb', line 14 def self.for(**attributes) return new if attributes.empty? new( **attributes.merge!( apps: attributes[:apps].map { |arguments| Application[**arguments] }, teams: attributes[:teams].map { |arguments| Team[**arguments] }, users: attributes[:users].map { |arguments| User[**arguments] } ) ) end |