Class: Diff::Edit
- Inherits:
-
Struct
- Object
- Struct
- Diff::Edit
- Defined in:
- lib/diff.rb
Instance Attribute Summary collapse
-
#a_line ⇒ Object
Returns the value of attribute a_line.
-
#b_line ⇒ Object
Returns the value of attribute b_line.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#a_line ⇒ Object
Returns the value of attribute a_line
14 15 16 |
# File 'lib/diff.rb', line 14 def a_line @a_line end |
#b_line ⇒ Object
Returns the value of attribute b_line
14 15 16 |
# File 'lib/diff.rb', line 14 def b_line @b_line end |
#type ⇒ Object
Returns the value of attribute type
14 15 16 |
# File 'lib/diff.rb', line 14 def type @type end |
Instance Method Details
#a_lines ⇒ Object
15 16 17 |
# File 'lib/diff.rb', line 15 def a_lines [a_line] end |
#to_s ⇒ Object
19 20 21 22 |
# File 'lib/diff.rb', line 19 def to_s line = a_line || b_line SYMBOLS.fetch(type) + line.text end |