Class: NTYChangeLog::Change

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description, issue) ⇒ Change

Returns a new instance of Change.



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

def initialize(description, issue)
  @description = description
  @issue = issue
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#issueObject (readonly)

Returns the value of attribute issue.



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

def issue
  @issue
end

Instance Method Details

#to_sObject



10
11
12
13
14
15
16
# File 'lib/nty_change_log/change.rb', line 10

def to_s
  if issue == nil
    "* #{description}"
  else
    "* #{description} #{issue}"
  end
end