class Licensed::Report
Attributes
Public Class Methods
Source
# File lib/licensed/report.rb, line 7 def initialize(name:, target:) super() @name = name @target = target end
Calls superclass method
Public Instance Methods
Source
# File lib/licensed/report.rb, line 25 def all_reports result = [] result << self result.push(*reports.flat_map(&:all_reports)) end
Source
# File lib/licensed/report.rb, line 32 def to_h # add name, errors and warnings if they have real data output = {} output["name"] = name unless name.to_s.empty? output["errors"] = errors.dup if errors.any? output["warnings"] = warnings.dup if warnings.any? # merge the hash data from the report. command-specified data always # overwrites local data output.merge(super) end
Returns the data from the report as a hash
Calls superclass method