Class: NTYChangeLog::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/nty_change_log/version.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_groupsObject (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

#nameObject (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_sObject



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