Class: Coverband::Reporters::JSONReport
- Defined in:
- lib/coverband/reporters/json_report.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#as_report ⇒ Object
Returns the value of attribute as_report.
-
#base_path ⇒ Object
Returns the value of attribute base_path.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#filtered_report_files ⇒ Object
Returns the value of attribute filtered_report_files.
-
#options ⇒ Object
Returns the value of attribute options.
-
#page ⇒ Object
Returns the value of attribute page.
-
#store ⇒ Object
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize(store, options = {}) ⇒ JSONReport
constructor
A new instance of JSONReport.
- #report ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(store, options = {}) ⇒ JSONReport
Returns a new instance of JSONReport.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/coverband/reporters/json_report.rb', line 10 def initialize(store, = {}) self. = self.page = .fetch(:page) { nil } self.filename = .fetch(:filename) { nil } self.as_report = .fetch(:as_report) { false } self.base_path = .fetch(:base_path) { "./" } self.store = store coverband_reports = Coverband::Reporters::Base.report(store, ) # NOTE: paged reports can't find and add in files that has never been loaded self.filtered_report_files = if page || filename coverband_reports else self.class.fix_reports(coverband_reports) end end |
Instance Attribute Details
#as_report ⇒ Object
Returns the value of attribute as_report.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def as_report @as_report end |
#base_path ⇒ Object
Returns the value of attribute base_path.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def base_path @base_path end |
#filename ⇒ Object
Returns the value of attribute filename.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def filename @filename end |
#filtered_report_files ⇒ Object
Returns the value of attribute filtered_report_files.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def filtered_report_files @filtered_report_files end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def @options end |
#page ⇒ Object
Returns the value of attribute page.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def page @page end |
#store ⇒ Object
Returns the value of attribute store.
8 9 10 |
# File 'lib/coverband/reporters/json_report.rb', line 8 def store @store end |
Instance Method Details
#report ⇒ Object
27 28 29 |
# File 'lib/coverband/reporters/json_report.rb', line 27 def report report_as_json end |