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.
14 15 16 17 18 |
# File 'lib/git_diff/stats.rb', line 14 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.
5 6 7 |
# File 'lib/git_diff/stats.rb', line 5 def number_of_additions @number_of_additions end |
#number_of_deletions ⇒ Object (readonly)
Returns the value of attribute number_of_deletions.
5 6 7 |
# File 'lib/git_diff/stats.rb', line 5 def number_of_deletions @number_of_deletions end |
#number_of_lines ⇒ Object (readonly)
Returns the value of attribute number_of_lines.
5 6 7 |
# File 'lib/git_diff/stats.rb', line 5 def number_of_lines @number_of_lines end |