Class: NTYChangeLog::Version
- Inherits:
-
Object
- Object
- NTYChangeLog::Version
- Defined in:
- lib/nty_change_log/version.rb
Instance Attribute Summary collapse
-
#change_groups ⇒ Object
readonly
Returns the value of attribute change_groups.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, change_groups) ⇒ Version
constructor
A new instance of Version.
- #to_s ⇒ Object
Constructor Details
#initialize(name, change_groups) ⇒ Version
Returns a new instance of Version.
5 6 7 8 |
# File 'lib/nty_change_log/version.rb', line 5 def initialize(name, change_groups) @name = name @change_groups = change_groups end |
Instance Attribute Details
#change_groups ⇒ Object (readonly)
Returns the value of attribute change_groups.
3 4 5 |
# File 'lib/nty_change_log/version.rb', line 3 def change_groups @change_groups end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/nty_change_log/version.rb', line 3 def name @name end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/nty_change_log/version.rb', line 10 def to_s (["## #{name}"] + change_groups.map(&:to_s)).join("\n\n") end |