Class: SvgConform::QualityMetrics::Configuration::QualityLevel
- Inherits:
-
Object
- Object
- SvgConform::QualityMetrics::Configuration::QualityLevel
- Defined in:
- lib/svg_conform/quality_metrics/configuration.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#max_score ⇒ Object
readonly
Returns the value of attribute max_score.
-
#min_score ⇒ Object
readonly
Returns the value of attribute min_score.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(name, config) ⇒ QualityLevel
constructor
A new instance of QualityLevel.
Constructor Details
#initialize(name, config) ⇒ QualityLevel
Returns a new instance of QualityLevel.
269 270 271 272 273 274 275 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 269 def initialize(name, config) @name = name @min_score = config["min_score"].to_i @max_score = config["max_score"]&.to_i @description = config["description"] freeze end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
267 268 269 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 267 def description @description end |
#max_score ⇒ Object (readonly)
Returns the value of attribute max_score.
267 268 269 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 267 def max_score @max_score end |
#min_score ⇒ Object (readonly)
Returns the value of attribute min_score.
267 268 269 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 267 def min_score @min_score end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
267 268 269 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 267 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
277 278 279 280 281 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 277 def ==(other) other.is_a?(QualityLevel) && name == other.name && min_score == other.min_score end |