Class: Rugged::Diff::Line
- Inherits:
-
Object
- Object
- Rugged::Diff::Line
- Defined in:
- lib/rugged/diff/line.rb,
ext/rugged/rugged_diff_line.c
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#line_origin ⇒ Object
readonly
Returns the value of attribute line_origin.
-
#new_lineno ⇒ Object
readonly
Returns the value of attribute new_lineno.
-
#old_lineno ⇒ Object
readonly
Returns the value of attribute old_lineno.
-
#owner ⇒ Object
(also: #hunk)
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
- #addition? ⇒ Boolean
- #context? ⇒ Boolean
- #deletion? ⇒ Boolean
- #eof_newline? ⇒ Boolean
- #inspect ⇒ Object
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/rugged/diff/line.rb', line 4 def content @content end |
#line_origin ⇒ Object (readonly)
Returns the value of attribute line_origin.
4 5 6 |
# File 'lib/rugged/diff/line.rb', line 4 def line_origin @line_origin end |
#new_lineno ⇒ Object (readonly)
Returns the value of attribute new_lineno.
4 5 6 |
# File 'lib/rugged/diff/line.rb', line 4 def new_lineno @new_lineno end |
#old_lineno ⇒ Object (readonly)
Returns the value of attribute old_lineno.
4 5 6 |
# File 'lib/rugged/diff/line.rb', line 4 def old_lineno @old_lineno end |
#owner ⇒ Object (readonly) Also known as: hunk
Returns the value of attribute owner.
4 5 6 |
# File 'lib/rugged/diff/line.rb', line 4 def owner @owner end |
Instance Method Details
#addition? ⇒ Boolean
12 13 14 |
# File 'lib/rugged/diff/line.rb', line 12 def addition? @line_origin == :addition end |
#context? ⇒ Boolean
8 9 10 |
# File 'lib/rugged/diff/line.rb', line 8 def context? @line_origin == :context end |
#deletion? ⇒ Boolean
16 17 18 |
# File 'lib/rugged/diff/line.rb', line 16 def deletion? @line_origin == :deletion end |
#eof_newline? ⇒ Boolean
20 21 22 |
# File 'lib/rugged/diff/line.rb', line 20 def eof_newline? @line_origin == :eof_newline end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/rugged/diff/line.rb', line 24 def inspect "#<#{self.class.name}:#{object_id} {line_origin: #{line_origin.inspect}, content: #{content.inspect}>" end |