Class: GitDiff::Line::Context
- Inherits:
-
Object
- Object
- GitDiff::Line::Context
- Defined in:
- lib/git_diff/line/context.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#line_number ⇒ Object
Returns the value of attribute line_number.
Instance Method Summary collapse
- #addition? ⇒ Boolean
- #deletion? ⇒ Boolean
-
#initialize(content, line_number = nil) ⇒ Context
constructor
A new instance of Context.
- #to_s ⇒ Object
Constructor Details
#initialize(content, line_number = nil) ⇒ Context
Returns a new instance of Context.
8 9 10 11 |
# File 'lib/git_diff/line/context.rb', line 8 def initialize(content, line_number = nil) @content = content @line_number = line_number end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/git_diff/line/context.rb', line 6 def content @content end |
#line_number ⇒ Object
Returns the value of attribute line_number.
6 7 8 |
# File 'lib/git_diff/line/context.rb', line 6 def line_number @line_number end |
Instance Method Details
#addition? ⇒ Boolean
21 22 23 |
# File 'lib/git_diff/line/context.rb', line 21 def addition? false end |
#deletion? ⇒ Boolean
17 18 19 |
# File 'lib/git_diff/line/context.rb', line 17 def deletion? false end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/git_diff/line/context.rb', line 25 def to_s content end |