Class: RailsStats::StatsFormatter
- Inherits:
-
Object
- Object
- RailsStats::StatsFormatter
- Defined in:
- lib/rails_stats/stats_formatter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#calculator ⇒ Object
readonly
Returns the value of attribute calculator.
Instance Method Summary collapse
-
#initialize(calculator, opts = {}) ⇒ StatsFormatter
constructor
A new instance of StatsFormatter.
Constructor Details
#initialize(calculator, opts = {}) ⇒ StatsFormatter
Returns a new instance of StatsFormatter.
3 4 5 6 7 8 9 |
# File 'lib/rails_stats/stats_formatter.rb', line 3 def initialize(calculator, opts = {}) @calculator = calculator @statistics = calculator.statistics @code_total = calculator.code_total @tests_total = calculator.tests_total @grand_total = calculator.grand_total end |
Instance Attribute Details
#calculator ⇒ Object (readonly)
Returns the value of attribute calculator.
11 12 13 |
# File 'lib/rails_stats/stats_formatter.rb', line 11 def calculator @calculator end |