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.



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

def binary
  @binary
end

#new_fileObject (readonly)

Returns the value of attribute new_file.



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

def new_file
  @new_file
end

#old_fileObject (readonly)

Returns the value of attribute old_file.



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

def old_file
  @old_file
end

#ownerObject (readonly) Also known as: diff

Returns the value of attribute owner.



4
5
6
# File 'lib/rugged/diff/delta.rb', line 4

def owner
  @owner
end

#similarityObject (readonly)

Returns the value of attribute similarity.



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

def similarity
  @similarity
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#status_charObject (readonly)

Returns the value of attribute status_char.



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

def status_char
  @status_char
end

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


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

def added?
  status == :added
end

#copied?Boolean

Returns:

  • (Boolean)


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

def copied?
  status == :copied
end

#deleted?Boolean

Returns:

  • (Boolean)


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

def deleted?
  status == :deleted
end

#ignored?Boolean

Returns:

  • (Boolean)


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

def ignored?
  status == :ignored
end

#inspectObject



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

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)


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

def modified?
  status == :modified
end

#renamed?Boolean

Returns:

  • (Boolean)


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

def renamed?
  status == :renamed
end

#typechange?Boolean

Returns:

  • (Boolean)


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

def typechange?
  status == :typechange
end

#untracked?Boolean

Returns:

  • (Boolean)


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

def untracked?
  status == :untracked
end