Class: Project::Unpacker::Total
- Inherits:
-
Base
- Object
- Base
- Project::Unpacker::Total
show all
- Defined in:
- lib/ossert/repositories.rb
Instance Method Summary
collapse
Methods inherited from Base
#coerce_value, #initialize, #stored_data
Instance Method Details
#new_stats_object ⇒ Object
102
103
104
|
# File 'lib/ossert/repositories.rb', line 102
def new_stats_object
Kernel.const_get("Ossert::Stats::#{@stats_type.capitalize}Total").new
end
|
#process ⇒ Object
106
107
108
109
110
111
112
|
# File 'lib/ossert/repositories.rb', line 106
def process
MultiJson.load(
stored_data
).each_with_object(new_stats_object) do |(metric, value), stats_object|
stats_object.send "#{metric}=", coerce_value(value)
end
end
|
#section ⇒ Object
98
99
100
|
# File 'lib/ossert/repositories.rb', line 98
def section
:total
end
|