Class: GitDiffMap::Line

Inherits:
GitDiffParser::Line
  • Object
show all
Defined in:
lib/git_diff_map/line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



10
11
12
# File 'lib/git_diff_map/line.rb', line 10

def content
  @content
end

Instance Method Details

#bodyObject

trim ‘+` or - prefix



13
14
15
# File 'lib/git_diff_map/line.rb', line 13

def body
  content[1..-1]
end

#typeString

Returns + or -.

Returns:

  • (String)

    + or -



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

def type
  content[0]
end