Class: Cobplexity::Metric
- Inherits:
-
Object
- Object
- Cobplexity::Metric
- Defined in:
- lib/cobplexity/analyzer.rb
Instance Attribute Summary collapse
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#color ⇒ Object
Returns the value of attribute color.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize ⇒ Metric
constructor
A new instance of Metric.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Metric
Returns a new instance of Metric.
41 42 43 |
# File 'lib/cobplexity/analyzer.rb', line 41 def initialize @categories = [] end |
Instance Attribute Details
#categories ⇒ Object
Returns the value of attribute categories.
40 41 42 |
# File 'lib/cobplexity/analyzer.rb', line 40 def categories @categories end |
#color ⇒ Object
Returns the value of attribute color.
40 41 42 |
# File 'lib/cobplexity/analyzer.rb', line 40 def color @color end |
#size ⇒ Object
Returns the value of attribute size.
40 41 42 |
# File 'lib/cobplexity/analyzer.rb', line 40 def size @size end |
Instance Method Details
#to_s ⇒ Object
44 45 46 47 48 49 |
# File 'lib/cobplexity/analyzer.rb', line 44 def to_s categories = @categories.collect do |category| category.delete '",' end "#{@size},#{@color},#{categories.join ','}" end |