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.
-
#content_offset ⇒ Object
readonly
Returns the value of attribute content_offset.
-
#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.
Instance Method Summary collapse
- #addition? ⇒ Boolean
- #binary? ⇒ Boolean
- #context? ⇒ Boolean
- #deletion? ⇒ Boolean
- #eof_newline_added? ⇒ Boolean
- #eof_newline_removed? ⇒ Boolean
- #eof_no_newline? ⇒ Boolean
- #file_header? ⇒ Boolean
- #hunk_header? ⇒ Boolean
- #inspect ⇒ Object
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
9 10 11 |
# File 'lib/rugged/diff/line.rb', line 9 def content @content end |
#content_offset ⇒ Object (readonly)
Returns the value of attribute content_offset.
9 10 11 |
# File 'lib/rugged/diff/line.rb', line 9 def content_offset @content_offset end |
#line_origin ⇒ Object (readonly)
Returns the value of attribute line_origin.
9 10 11 |
# File 'lib/rugged/diff/line.rb', line 9 def line_origin @line_origin end |
#new_lineno ⇒ Object (readonly)
Returns the value of attribute new_lineno.
9 10 11 |
# File 'lib/rugged/diff/line.rb', line 9 def new_lineno @new_lineno end |
#old_lineno ⇒ Object (readonly)
Returns the value of attribute old_lineno.
9 10 11 |
# File 'lib/rugged/diff/line.rb', line 9 def old_lineno @old_lineno end |
Instance Method Details
#addition? ⇒ Boolean
15 16 17 |
# File 'lib/rugged/diff/line.rb', line 15 def addition? @line_origin == :addition end |
#binary? ⇒ Boolean
43 44 45 |
# File 'lib/rugged/diff/line.rb', line 43 def binary? @line_origin == :binary end |
#context? ⇒ Boolean
11 12 13 |
# File 'lib/rugged/diff/line.rb', line 11 def context? @line_origin == :context end |
#deletion? ⇒ Boolean
19 20 21 |
# File 'lib/rugged/diff/line.rb', line 19 def deletion? @line_origin == :deletion end |
#eof_newline_added? ⇒ Boolean
27 28 29 |
# File 'lib/rugged/diff/line.rb', line 27 def eof_newline_added? @line_origin == :eof_newline_added end |
#eof_newline_removed? ⇒ Boolean
31 32 33 |
# File 'lib/rugged/diff/line.rb', line 31 def eof_newline_removed? @line_origin == :eof_newline_removed end |
#eof_no_newline? ⇒ Boolean
23 24 25 |
# File 'lib/rugged/diff/line.rb', line 23 def eof_no_newline? @line_origin == :eof_no_newline end |
#file_header? ⇒ Boolean
35 36 37 |
# File 'lib/rugged/diff/line.rb', line 35 def file_header? @line_origin == :file_header end |
#hunk_header? ⇒ Boolean
39 40 41 |
# File 'lib/rugged/diff/line.rb', line 39 def hunk_header? @line_origin == :hunk_header end |
#inspect ⇒ Object
47 48 49 |
# File 'lib/rugged/diff/line.rb', line 47 def inspect "#<#{self.class.name}:#{object_id} {line_origin: #{line_origin.inspect}, content: #{content.inspect}>" end |