Class: Disloku::FileChange

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository, fullPath, changeType, dirty) ⇒ FileChange

Returns a new instance of FileChange.



7
8
9
10
11
12
# File 'lib/disloku/FileChange.rb', line 7

def initialize(repository, fullPath, changeType, dirty)
	@repository = repository
	@fullPath = fullPath
	@changeType = changeType
	@dirty = dirty
end

Instance Attribute Details

#changeTypeObject

Returns the value of attribute changeType.



5
6
7
# File 'lib/disloku/FileChange.rb', line 5

def changeType
  @changeType
end

#dirtyObject

Returns the value of attribute dirty.



5
6
7
# File 'lib/disloku/FileChange.rb', line 5

def dirty
  @dirty
end

#repositoryObject

Returns the value of attribute repository.



5
6
7
# File 'lib/disloku/FileChange.rb', line 5

def repository
  @repository
end

Instance Method Details

#getFile(target) ⇒ Object



14
15
16
# File 'lib/disloku/FileChange.rb', line 14

def getFile(target)
	return Util::File.new(@fullPath, @repository.root, target, self)
end

#to_sObject



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

def to_s()
	return "<#{@changeType}> #{@fullPath}" + (@dirty ? " (dirty)" : "")
end