Class: Floom::Report
- Inherits:
-
Object
- Object
- Floom::Report
- Defined in:
- lib/floom/models/report.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(report = {}) ⇒ Report
constructor
A new instance of Report.
- #to_hash ⇒ Object
Constructor Details
#initialize(report = {}) ⇒ Report
Returns a new instance of Report.
12 13 14 |
# File 'lib/floom/models/report.rb', line 12 def initialize(report = {}) @metrics = report end |
Class Method Details
.parse(report) ⇒ Object
6 7 8 |
# File 'lib/floom/models/report.rb', line 6 def parse(report) new(report.stringMetrics.merge(report.longMetrics).merge(report.doubleMetrics)).to_hash end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 |
# File 'lib/floom/models/report.rb', line 16 def to_hash @metrics.dup end |