Class: Licensed::Reporters::Reporter::Report
- Inherits:
-
Hash
- Object
- Hash
- Licensed::Reporters::Reporter::Report
- Defined in:
- lib/licensed/reporters/reporter.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #all_reports ⇒ Object
- #errors ⇒ Object
-
#initialize(name:, target:) ⇒ Report
constructor
A new instance of Report.
- #reports ⇒ Object
- #warnings ⇒ Object
Constructor Details
#initialize(name:, target:) ⇒ Report
Returns a new instance of Report.
8 9 10 11 12 |
# File 'lib/licensed/reporters/reporter.rb', line 8 def initialize(name:, target:) super() @name = name @target = target end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/licensed/reporters/reporter.rb', line 6 def name @name end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
7 8 9 |
# File 'lib/licensed/reporters/reporter.rb', line 7 def target @target end |
Instance Method Details
#all_reports ⇒ Object
26 27 28 29 30 |
# File 'lib/licensed/reporters/reporter.rb', line 26 def all_reports result = [] result << self result.push(*reports.flat_map(&:all_reports)) end |
#errors ⇒ Object
18 19 20 |
# File 'lib/licensed/reporters/reporter.rb', line 18 def errors @errors ||= [] end |
#reports ⇒ Object
14 15 16 |
# File 'lib/licensed/reporters/reporter.rb', line 14 def reports @reports ||= [] end |
#warnings ⇒ Object
22 23 24 |
# File 'lib/licensed/reporters/reporter.rb', line 22 def warnings @warnings ||= [] end |