Class: Aio::Base::Toolkit::Diff::Edit
- Inherits:
-
Struct
- Object
- Struct
- Aio::Base::Toolkit::Diff::Edit
- Defined in:
- lib/aio/base/toolkit/myers.rb
Instance Attribute Summary collapse
-
#new_line ⇒ Object
Returns the value of attribute new_line.
-
#old_line ⇒ Object
Returns the value of attribute old_line.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #new_number ⇒ Object
- #new_text ⇒ Object
- #old_number ⇒ Object
- #old_text ⇒ Object
- #text ⇒ Object
- #type_class ⇒ Object
- #type_class_con ⇒ Object
Instance Attribute Details
#new_line ⇒ Object
Returns the value of attribute new_line
126 127 128 |
# File 'lib/aio/base/toolkit/myers.rb', line 126 def new_line @new_line end |
#old_line ⇒ Object
Returns the value of attribute old_line
126 127 128 |
# File 'lib/aio/base/toolkit/myers.rb', line 126 def old_line @old_line end |
#type ⇒ Object
Returns the value of attribute type
126 127 128 |
# File 'lib/aio/base/toolkit/myers.rb', line 126 def type @type end |
Class Method Details
.empty_line ⇒ Object
161 162 163 |
# File 'lib/aio/base/toolkit/myers.rb', line 161 def self.empty_line Edit.new(:eql, Diff.empty_line, Diff.empty_line) end |
Instance Method Details
#empty? ⇒ Boolean
149 150 151 |
# File 'lib/aio/base/toolkit/myers.rb', line 149 def empty? (old_line.empty? and new_line.empty?) end |
#new_number ⇒ Object
132 133 134 135 |
# File 'lib/aio/base/toolkit/myers.rb', line 132 def new_number return '' if new_line.number.to_s == '0' new_line ? new_line.number.to_s : '' end |
#new_text ⇒ Object
145 146 147 |
# File 'lib/aio/base/toolkit/myers.rb', line 145 def new_text new_line.text end |
#old_number ⇒ Object
127 128 129 130 |
# File 'lib/aio/base/toolkit/myers.rb', line 127 def old_number return '' if old_line.number.to_s == '0' old_line ? old_line.number.to_s : '' end |
#old_text ⇒ Object
141 142 143 |
# File 'lib/aio/base/toolkit/myers.rb', line 141 def old_text old_line.text end |
#text ⇒ Object
137 138 139 |
# File 'lib/aio/base/toolkit/myers.rb', line 137 def text (old_line || new_line).text end |
#type_class ⇒ Object
153 154 155 |
# File 'lib/aio/base/toolkit/myers.rb', line 153 def type_class type.to_s + '_style' end |
#type_class_con ⇒ Object
157 158 159 |
# File 'lib/aio/base/toolkit/myers.rb', line 157 def type_class_con type.to_s + '_style_con' end |