Class: SpecTracker::Reporter::Report
- Inherits:
-
Object
- Object
- SpecTracker::Reporter::Report
- Defined in:
- lib/spec_tracker/reporter/report.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
-
#initialize(data:, topic:) ⇒ Report
constructor
A new instance of Report.
- #progression ⇒ Object
Constructor Details
#initialize(data:, topic:) ⇒ Report
Returns a new instance of Report.
6 7 8 9 |
# File 'lib/spec_tracker/reporter/report.rb', line 6 def initialize(data:, topic:) @data = data @topic = topic end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/spec_tracker/reporter/report.rb', line 4 def data @data end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
4 5 6 |
# File 'lib/spec_tracker/reporter/report.rb', line 4 def topic @topic end |
Instance Method Details
#progression ⇒ Object
11 12 13 14 |
# File 'lib/spec_tracker/reporter/report.rb', line 11 def progression success_count = data.select {|report_datum| report_datum.status.success?}.size (success_count.to_f / data.size.to_f * 100).round(1) end |