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(number, change_groups) ⇒ Version

Returns a new instance of Version.



5
6
7
8
# File 'lib/nty_change_log/version.rb', line 5

def initialize(number, change_groups)
  @number = number
  @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

#numberObject (readonly)

Returns the value of attribute number.



3
4
5
# File 'lib/nty_change_log/version.rb', line 3

def number
  @number
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/nty_change_log/version.rb', line 10

def to_s
  (["## #{number}"] + change_groups.map(&:to_s)).join("\n\n")
end