Class: Gitlab::Release::Changelog::Entry
- Inherits:
-
Object
- Object
- Gitlab::Release::Changelog::Entry
- Defined in:
- lib/gitlab/release/changelog/entry.rb
Overview
This class represents a single changelog element.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id, title) ⇒ Entry
constructor
A new instance of Entry.
- #to_s ⇒ Object
-
#to_s_for_changelog(with_reference) ⇒ String
Print this entry with or without reference.
Constructor Details
#initialize(id, title) ⇒ Entry
Returns a new instance of Entry.
12 13 14 15 |
# File 'lib/gitlab/release/changelog/entry.rb', line 12 def initialize(id, title) @id = id @title = title end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/gitlab/release/changelog/entry.rb', line 8 def id @id end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/gitlab/release/changelog/entry.rb', line 8 def title @title end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/gitlab/release/changelog/entry.rb', line 17 def to_s "Changelog::Entry { id: #{id}, title: '#{title}' }" end |
#to_s_for_changelog(with_reference) ⇒ String
Print this entry with or without reference.
27 28 29 |
# File 'lib/gitlab/release/changelog/entry.rb', line 27 def to_s_for_changelog(with_reference) "- #{title}" end |