Class: Pelusa::Report

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#analysesObject (readonly)

Returns the value of attribute analyses.



17
18
19
# File 'lib/pelusa/report.rb', line 17

def analyses
  @analyses
end

#class_nameObject (readonly)

Returns the value of attribute class_name.



17
18
19
# File 'lib/pelusa/report.rb', line 17

def class_name
  @class_name
end

#typeObject (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

Returns:

  • (Boolean)


19
20
21
# File 'lib/pelusa/report.rb', line 19

def successful?
  @analyses.all? { |analysis| analysis.successful? }
end