Class: Rugged::Diff::Delta

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rugged/diff/delta.rb,
ext/rugged/rugged_diff_delta.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#binaryObject (readonly) Also known as: binary?

Returns the value of attribute binary.



13
14
15
# File 'lib/rugged/diff/delta.rb', line 13

def binary
  @binary
end

#new_fileObject (readonly)

Returns the value of attribute new_file.



10
11
12
# File 'lib/rugged/diff/delta.rb', line 10

def new_file
  @new_file
end

#old_fileObject (readonly)

Returns the value of attribute old_file.



9
10
11
# File 'lib/rugged/diff/delta.rb', line 9

def old_file
  @old_file
end

#ownerObject (readonly) Also known as: diff

Returns the value of attribute owner.



6
7
8
# File 'lib/rugged/diff/delta.rb', line 6

def owner
  @owner
end

#similarityObject (readonly)

Returns the value of attribute similarity.



11
12
13
# File 'lib/rugged/diff/delta.rb', line 11

def similarity
  @similarity
end

#statusObject (readonly)

Returns the value of attribute status.



12
13
14
# File 'lib/rugged/diff/delta.rb', line 12

def status
  @status
end

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rugged/diff/delta.rb', line 17

def added?
  status == :added
end

#copied?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/rugged/diff/delta.rb', line 33

def copied?
  status == :copied
end

#deleted?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/rugged/diff/delta.rb', line 21

def deleted?
  status == :deleted
end

#ignored?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/rugged/diff/delta.rb', line 37

def ignored?
  status == :ignored
end

#inspectObject



49
50
51
# File 'lib/rugged/diff/delta.rb', line 49

def inspect
  "#<#{self.class.name}:#{object_id} {old_file: #{old_file.inspect}, new_file: #{new_file.inspect}, similarity: #{similarity.inspect}, status: #{status.inspect}>"
end

#modified?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/rugged/diff/delta.rb', line 25

def modified?
  status == :modified
end

#renamed?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/rugged/diff/delta.rb', line 29

def renamed?
  status == :renamed
end

#typechange?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/rugged/diff/delta.rb', line 45

def typechange?
  status == :typechange
end

#untracked?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/rugged/diff/delta.rb', line 41

def untracked?
  status == :untracked
end