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.
6 7 8 9 |
# File 'lib/git_diff/line/context.rb', line 6 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.
4 5 6 |
# File 'lib/git_diff/line/context.rb', line 4 def content @content end |
#line_number ⇒ Object
Returns the value of attribute line_number.
4 5 6 |
# File 'lib/git_diff/line/context.rb', line 4 def line_number @line_number end |
Instance Method Details
#addition? ⇒ Boolean
19 20 21 |
# File 'lib/git_diff/line/context.rb', line 19 def addition? false end |
#deletion? ⇒ Boolean
15 16 17 |
# File 'lib/git_diff/line/context.rb', line 15 def deletion? false end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/git_diff/line/context.rb', line 23 def to_s content end |