Class: Ghub::Models::Links
- Inherits:
-
Struct
- Object
- Struct
- Ghub::Models::Links
- Defined in:
- lib/ghub/models/links.rb
Overview
Defines a set of links.
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#commits ⇒ Object
Returns the value of attribute commits.
-
#html ⇒ Object
Returns the value of attribute html.
-
#issue ⇒ Object
Returns the value of attribute issue.
-
#review_comment ⇒ Object
Returns the value of attribute review_comment.
-
#review_comments ⇒ Object
Returns the value of attribute review_comments.
-
#self ⇒ Object
Returns the value of attribute self.
-
#statuses ⇒ Object
Returns the value of attribute statuses.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Links
constructor
A new instance of Links.
Constructor Details
#initialize ⇒ Links
Returns a new instance of Links.
21 22 23 24 |
# File 'lib/ghub/models/links.rb', line 21 def initialize(**) super freeze end |
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def comments @comments end |
#commits ⇒ Object
Returns the value of attribute commits
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def commits @commits end |
#html ⇒ Object
Returns the value of attribute html
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def html @html end |
#issue ⇒ Object
Returns the value of attribute issue
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def issue @issue end |
#review_comment ⇒ Object
Returns the value of attribute review_comment
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def review_comment @review_comment end |
#review_comments ⇒ Object
Returns the value of attribute review_comments
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def review_comments @review_comments end |
#self ⇒ Object
Returns the value of attribute self
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def self @self end |
#statuses ⇒ Object
Returns the value of attribute statuses
6 7 8 |
# File 'lib/ghub/models/links.rb', line 6 def statuses @statuses end |
Class Method Details
.for(**attributes) ⇒ Object
16 17 18 19 |
# File 'lib/ghub/models/links.rb', line 16 def self.for(**attributes) attributes.reduce({}) { |collection, (key, value)| collection.merge key => Link[**value] } .then { |updates| new(**updates) } end |