Class: Project::Unpacker
- Inherits:
-
Object
show all
- Defined in:
- lib/ossert/repositories.rb
Defined Under Namespace
Classes: Base, Quarter, Total
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(stored_project) ⇒ Unpacker
Returns a new instance of Unpacker.
39
40
41
|
# File 'lib/ossert/repositories.rb', line 39
def initialize(stored_project)
@stored_project = stored_project
end
|
Class Method Details
.process(stored_project) ⇒ Object
43
44
45
|
# File 'lib/ossert/repositories.rb', line 43
def self.process(stored_project)
new(stored_project).process
end
|
Instance Method Details
#process ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/ossert/repositories.rb', line 47
def process
[:agility, :community].each_with_object(process_meta) do |stats_type, result|
result[stats_type] = factory_project_stats(stats_type).new(
[Total, Quarter].each_with_object({}) do |unpacker_type, stats_result|
section_unpacker = unpacker_type.new(@stored_project, stats_type)
stats_result[section_unpacker.section] = section_unpacker.process
end
)
end
ensure
@stored_project = nil
end
|