Class: Delta

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#isObject

Returns the value of attribute is.



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

def is
  @is
end

#wasObject

Returns the value of attribute was.



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

def was
  @was
end

Instance Method Details

#to_sObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/deltatracker.rb', line 5

def to_s
	if was == nil
		diff = "void => #{is.status}"
	elsif is == nil
		diff = "#{was.status} => void"
	else
		diff = "#{was.status} => #{is.status}"
	end
	"-#{is.title}\n" +
	"  #{diff}"
end