Class: Pelusa::Report
- Inherits:
-
Object
- Object
- Pelusa::Report
- Defined in:
- lib/pelusa/report.rb
Overview
Public: A Report is a wrapper that relates a class name with all its analyses for different lint checks.
Instance Attribute Summary collapse
-
#analyses ⇒ Object
readonly
Returns the value of attribute analyses.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, analyses) ⇒ Report
constructor
Public: Initializes a new Report.
- #successful? ⇒ Boolean
Constructor Details
#initialize(name, type, analyses) ⇒ Report
Public: Initializes a new Report.
class_name - The Symbol name of the class being analyzed. type - the String type of the class being analyzed (class or module). analyses - An Array of Analysis objects.
11 12 13 14 15 |
# File 'lib/pelusa/report.rb', line 11 def initialize(name, type, analyses) @class_name = name @type = type @analyses = analyses end |
Instance Attribute Details
#analyses ⇒ Object (readonly)
Returns the value of attribute analyses.
17 18 19 |
# File 'lib/pelusa/report.rb', line 17 def analyses @analyses end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
17 18 19 |
# File 'lib/pelusa/report.rb', line 17 def class_name @class_name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
17 18 19 |
# File 'lib/pelusa/report.rb', line 17 def type @type end |
Instance Method Details
#successful? ⇒ Boolean
19 20 21 |
# File 'lib/pelusa/report.rb', line 19 def successful? @analyses.all? { |analysis| analysis.successful? } end |