Class: Disloku::ChangeSet

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/disloku/ChangeSet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(idFrom = "", idTo = "") ⇒ ChangeSet

Returns a new instance of ChangeSet.



12
13
14
15
16
# File 'lib/disloku/ChangeSet.rb', line 12

def initialize(idFrom = "", idTo = "")
	@changes = Array.new()
	@idFrom = idFrom
	@idTo = idTo
end

Instance Attribute Details

#idFromObject

Returns the value of attribute idFrom.



10
11
12
# File 'lib/disloku/ChangeSet.rb', line 10

def idFrom
  @idFrom
end

#idToObject

Returns the value of attribute idTo.



10
11
12
# File 'lib/disloku/ChangeSet.rb', line 10

def idTo
  @idTo
end

Instance Method Details

#dirty?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/disloku/ChangeSet.rb', line 18

def dirty?()
	return @changes.any?() { |f| f.dirty }
end

#to_sObject



22
23
24
# File 'lib/disloku/ChangeSet.rb', line 22

def to_s()
	return "#{idFrom} -> #{idTo} (#{dirty? ? 'dirty' : 'clean'})"
end