Class: GitDiff::Parser
- Inherits:
-
Object
- Object
- GitDiff::Parser
- Defined in:
- lib/git_diff/parser.rb
Instance Attribute Summary collapse
-
#diff ⇒ Object
readonly
Returns the value of attribute diff.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(string) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
Instance Attribute Details
#diff ⇒ Object (readonly)
Returns the value of attribute diff.
3 4 5 |
# File 'lib/git_diff/parser.rb', line 3 def diff @diff end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
3 4 5 |
# File 'lib/git_diff/parser.rb', line 3 def string @string end |
Instance Method Details
#parse ⇒ Object
10 11 12 13 14 |
# File 'lib/git_diff/parser.rb', line 10 def parse lines.each do |line| diff << line end end |