Class: VCSToolkit::Objects::Label
- Defined in:
- lib/vcs_toolkit/objects/label.rb
Instance Attribute Summary collapse
-
#reference_id ⇒ Object
Returns the value of attribute reference_id.
Attributes inherited from Object
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(id:, reference_id:, **context) ⇒ Label
constructor
A new instance of Label.
Methods inherited from Object
Methods included from Serializable
Methods included from Utils::HashableObject
Constructor Details
#initialize(id:, reference_id:, **context) ⇒ Label
Returns a new instance of Label.
8 9 10 11 12 13 14 15 |
# File 'lib/vcs_toolkit/objects/label.rb', line 8 def initialize(id:, reference_id:, **context) @reference_id = reference_id super id: id, object_type: :label, named: true, **context end |
Instance Attribute Details
#reference_id ⇒ Object
Returns the value of attribute reference_id.
5 6 7 |
# File 'lib/vcs_toolkit/objects/label.rb', line 5 def reference_id @reference_id end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
17 18 19 |
# File 'lib/vcs_toolkit/objects/label.rb', line 17 def ==(other) id == other.id and reference_id == other.reference_id end |
#hash ⇒ Object
23 24 25 |
# File 'lib/vcs_toolkit/objects/label.rb', line 23 def hash [id, reference_id].hash end |