Class: SvgConform::QualityMetrics::Configuration::QualityFormula
- Inherits:
-
Object
- Object
- SvgConform::QualityMetrics::Configuration::QualityFormula
- Defined in:
- lib/svg_conform/quality_metrics/configuration.rb
Instance Attribute Summary collapse
-
#critical_max_penalty ⇒ Object
readonly
Returns the value of attribute critical_max_penalty.
-
#critical_weight ⇒ Object
readonly
Returns the value of attribute critical_weight.
-
#error_density_max_penalty ⇒ Object
readonly
Returns the value of attribute error_density_max_penalty.
-
#error_density_weight ⇒ Object
readonly
Returns the value of attribute error_density_weight.
-
#high_max_penalty ⇒ Object
readonly
Returns the value of attribute high_max_penalty.
-
#high_weight ⇒ Object
readonly
Returns the value of attribute high_weight.
-
#non_remediable_max_penalty ⇒ Object
readonly
Returns the value of attribute non_remediable_max_penalty.
-
#non_remediable_weight ⇒ Object
readonly
Returns the value of attribute non_remediable_weight.
-
#valid_structure_bonus ⇒ Object
readonly
Returns the value of attribute valid_structure_bonus.
Instance Method Summary collapse
-
#initialize(config) ⇒ QualityFormula
constructor
A new instance of QualityFormula.
Constructor Details
#initialize(config) ⇒ QualityFormula
Returns a new instance of QualityFormula.
292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 292 def initialize(config) @error_density_weight = config["error_density_weight"].to_f @error_density_max_penalty = config["error_density_max_penalty"].to_i @non_remediable_weight = config["non_remediable_weight"].to_f @non_remediable_max_penalty = config["non_remediable_max_penalty"].to_i @critical_weight = config["critical_weight"].to_f @critical_max_penalty = config["critical_max_penalty"].to_i @high_weight = config["high_weight"].to_f @high_max_penalty = config["high_max_penalty"].to_i @valid_structure_bonus = config["valid_structure_bonus"].to_i freeze end |
Instance Attribute Details
#critical_max_penalty ⇒ Object (readonly)
Returns the value of attribute critical_max_penalty.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def critical_max_penalty @critical_max_penalty end |
#critical_weight ⇒ Object (readonly)
Returns the value of attribute critical_weight.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def critical_weight @critical_weight end |
#error_density_max_penalty ⇒ Object (readonly)
Returns the value of attribute error_density_max_penalty.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def error_density_max_penalty @error_density_max_penalty end |
#error_density_weight ⇒ Object (readonly)
Returns the value of attribute error_density_weight.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def error_density_weight @error_density_weight end |
#high_max_penalty ⇒ Object (readonly)
Returns the value of attribute high_max_penalty.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def high_max_penalty @high_max_penalty end |
#high_weight ⇒ Object (readonly)
Returns the value of attribute high_weight.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def high_weight @high_weight end |
#non_remediable_max_penalty ⇒ Object (readonly)
Returns the value of attribute non_remediable_max_penalty.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def non_remediable_max_penalty @non_remediable_max_penalty end |
#non_remediable_weight ⇒ Object (readonly)
Returns the value of attribute non_remediable_weight.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def non_remediable_weight @non_remediable_weight end |
#valid_structure_bonus ⇒ Object (readonly)
Returns the value of attribute valid_structure_bonus.
286 287 288 |
# File 'lib/svg_conform/quality_metrics/configuration.rb', line 286 def valid_structure_bonus @valid_structure_bonus end |