Module: GitDiff::LineNumber::ClassMethods
- Included in:
- GitDiff::LineNumber
- Defined in:
- lib/git_diff/line_number.rb
Instance Method Summary collapse
- #for_addition(line_number) ⇒ Object
- #for_context(line_number) ⇒ Object
- #for_deletion(line_number) ⇒ Object
Instance Method Details
#for_addition(line_number) ⇒ Object
8 9 10 |
# File 'lib/git_diff/line_number.rb', line 8 def for_addition(line_number) new(nil, line_number.right) end |
#for_context(line_number) ⇒ Object
16 17 18 |
# File 'lib/git_diff/line_number.rb', line 16 def for_context(line_number) new(line_number.left, line_number.right) end |
#for_deletion(line_number) ⇒ Object
12 13 14 |
# File 'lib/git_diff/line_number.rb', line 12 def for_deletion(line_number) new(line_number.left, nil) end |