Class: Policial::Line

Inherits:
Object
  • Object
show all
Defined in:
lib/policial/line.rb

Overview

Public: a changed line in a commit file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number, content, patch_position) ⇒ Line

Returns a new instance of Line.



8
9
10
11
12
# File 'lib/policial/line.rb', line 8

def initialize(number, content, patch_position)
  @number         = number
  @content        = content
  @patch_position = patch_position
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/policial/line.rb', line 6

def content
  @content
end

#numberObject (readonly)

Returns the value of attribute number.



6
7
8
# File 'lib/policial/line.rb', line 6

def number
  @number
end

#patch_positionObject (readonly)

Returns the value of attribute patch_position.



6
7
8
# File 'lib/policial/line.rb', line 6

def patch_position
  @patch_position
end

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/policial/line.rb', line 14

def changed?
  true
end