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.
5 6 7 |
# File 'lib/git_diff/parser.rb', line 5 def diff @diff end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
5 6 7 |
# File 'lib/git_diff/parser.rb', line 5 def string @string end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 16 |
# File 'lib/git_diff/parser.rb', line 12 def parse lines.each do |line| diff << line end end |