Class: Line
- Inherits:
-
Object
- Object
- Line
- Defined in:
- app/models/chunk.rb
Instance Attribute Summary collapse
-
#modified_position ⇒ Object
readonly
Returns the value of attribute modified_position.
-
#modified_text ⇒ Object
readonly
Returns the value of attribute modified_text.
-
#original_position ⇒ Object
readonly
Returns the value of attribute original_position.
-
#original_text ⇒ Object
readonly
Returns the value of attribute original_text.
Instance Method Summary collapse
-
#initialize(old_text, old_pos, new_text, new_pos) ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(old_text, old_pos, new_text, new_pos) ⇒ Line
Returns a new instance of Line.
40 41 42 43 44 |
# File 'app/models/chunk.rb', line 40 def initialize(old_text, old_pos, new_text, new_pos) @original_text, @modified_text = old_text, new_text @original_position = old_text && old_pos @modified_position = new_text && new_pos end |
Instance Attribute Details
#modified_position ⇒ Object (readonly)
Returns the value of attribute modified_position.
37 38 39 |
# File 'app/models/chunk.rb', line 37 def modified_position @modified_position end |
#modified_text ⇒ Object (readonly)
Returns the value of attribute modified_text.
37 38 39 |
# File 'app/models/chunk.rb', line 37 def modified_text @modified_text end |
#original_position ⇒ Object (readonly)
Returns the value of attribute original_position.
37 38 39 |
# File 'app/models/chunk.rb', line 37 def original_position @original_position end |
#original_text ⇒ Object (readonly)
Returns the value of attribute original_text.
37 38 39 |
# File 'app/models/chunk.rb', line 37 def original_text @original_text end |