Class: DiffChange

Inherits:
Struct
  • Object
show all
Defined in:
app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



3
4
5
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 3

def file
  @file
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 3

def type
  @type
end

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 4

def added?
  type == "A"
end

#broken?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 32

def broken?
  type == "B"
end

#copied?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 8

def copied?
  type == "C"
end

#deleted?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 12

def deleted?
  type == "D"
end

#modified?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 16

def modified?
  type == "M"
end

#renamed?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 20

def renamed?
  type == "R"
end

#type_changed?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 24

def type_changed?
  type == "T"
end

#unmerged?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'app/adapters/houston/adapters/version_control/git_adapter/diff_changes.rb', line 28

def unmerged?
  type == "U"
end