Class: GitDiff::Stats

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Defined in:
lib/git_diff/stats.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassMethods

total

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_additionsObject (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_deletionsObject (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_linesObject (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