Class: Rugged::Diff::Delta

Inherits:
Object
  • Object
show all
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.



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

def binary
  @binary
end

#new_fileObject (readonly)

Returns the value of attribute new_file.



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

def new_file
  @new_file
end

#old_fileObject (readonly)

Returns the value of attribute old_file.



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

def old_file
  @old_file
end

#ownerObject (readonly) Also known as: diff

Returns the value of attribute owner.



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

def owner
  @owner
end

#similarityObject (readonly)

Returns the value of attribute similarity.



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

def similarity
  @similarity
end

#statusObject (readonly)

Returns the value of attribute status.



15
16
17
# File 'lib/rugged/diff/delta.rb', line 15

def status
  @status
end

#status_charObject (readonly)

Returns the value of attribute status_char.



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

def status_char
  @status_char
end

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added?
  status == :added
end

#copied?Boolean

Returns:

  • (Boolean)


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

def copied?
  status == :copied
end

#deleted?Boolean

Returns:

  • (Boolean)


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

def deleted?
  status == :deleted
end

#ignored?Boolean

Returns:

  • (Boolean)


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

def ignored?
  status == :ignored
end

#inspectObject



53
54
55
# File 'lib/rugged/diff/delta.rb', line 53

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)


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

def modified?
  status == :modified
end

#renamed?Boolean

Returns:

  • (Boolean)


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

def renamed?
  status == :renamed
end

#typechange?Boolean

Returns:

  • (Boolean)


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

def typechange?
  status == :typechange
end

#untracked?Boolean

Returns:

  • (Boolean)


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

def untracked?
  status == :untracked
end