Class: GitDiff::Stats
- Inherits:
-
Object
- Object
- GitDiff::Stats
- Extended by:
- ClassMethods
- Defined in:
- lib/git_diff/stats.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#number_of_additions ⇒ Object
readonly
Returns the value of attribute number_of_additions.
-
#number_of_deletions ⇒ Object
readonly
Returns the value of attribute number_of_deletions.
-
#number_of_lines ⇒ Object
readonly
Returns the value of attribute number_of_lines.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Stats
constructor
A new instance of Stats.
Methods included from ClassMethods
Constructor Details
#initialize(attributes) ⇒ Stats
Returns a new instance of Stats.
12 13 14 15 16 |
# File 'lib/git_diff/stats.rb', line 12 def initialize(attributes) attributes.each do |name, value| instance_variable_set("@#{name}", value) end end |
Instance Attribute Details
#number_of_additions ⇒ Object (readonly)
Returns the value of attribute number_of_additions.
3 4 5 |
# File 'lib/git_diff/stats.rb', line 3 def number_of_additions @number_of_additions end |
#number_of_deletions ⇒ Object (readonly)
Returns the value of attribute number_of_deletions.
3 4 5 |
# File 'lib/git_diff/stats.rb', line 3 def number_of_deletions @number_of_deletions end |
#number_of_lines ⇒ Object (readonly)
Returns the value of attribute number_of_lines.
3 4 5 |
# File 'lib/git_diff/stats.rb', line 3 def number_of_lines @number_of_lines end |