Class: GitDiff::Diff
- Inherits:
-
Object
- Object
- GitDiff::Diff
- Defined in:
- lib/git_diff/diff.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
- #<<(string) ⇒ Object
-
#initialize ⇒ Diff
constructor
A new instance of Diff.
- #stats ⇒ Object
Constructor Details
#initialize ⇒ Diff
Returns a new instance of Diff.
7 8 9 |
# File 'lib/git_diff/diff.rb', line 7 def initialize @files = [] end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
5 6 7 |
# File 'lib/git_diff/diff.rb', line 5 def files @files end |
Instance Method Details
#<<(string) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/git_diff/diff.rb', line 11 def <<(string) if file = File.from_string(string) add_file file else append_to_current_file string end end |