Class: ArchUnit::Metrics::Assertion::CustomMetricViolation
- Inherits:
-
Common::Assertion::Violation
- Object
- Common::Assertion::Violation
- ArchUnit::Metrics::Assertion::CustomMetricViolation
- Defined in:
- lib/archunit/metrics/assertion/custom_metric.rb
Overview
A class whose calculated custom value did not satisfy the user's predicate.
Instance Attribute Summary collapse
-
#class_info ⇒ Object
readonly
Returns the value of attribute class_info.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#metric_name ⇒ Object
readonly
Returns the value of attribute metric_name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(class_info:, metric_name:, description:, value:) ⇒ CustomMetricViolation
constructor
A new instance of CustomMetricViolation.
Constructor Details
#initialize(class_info:, metric_name:, description:, value:) ⇒ CustomMetricViolation
Returns a new instance of CustomMetricViolation.
15 16 17 18 19 20 21 |
# File 'lib/archunit/metrics/assertion/custom_metric.rb', line 15 def initialize(class_info:, metric_name:, description:, value:) @class_info = class_info_value(class_info) @metric_name = immutable_string(metric_name, :metric_name) @description = immutable_string(description, :description) @value = numeric_value(value) super() end |
Instance Attribute Details
#class_info ⇒ Object (readonly)
Returns the value of attribute class_info.
13 14 15 |
# File 'lib/archunit/metrics/assertion/custom_metric.rb', line 13 def class_info @class_info end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
13 14 15 |
# File 'lib/archunit/metrics/assertion/custom_metric.rb', line 13 def description @description end |
#metric_name ⇒ Object (readonly)
Returns the value of attribute metric_name.
13 14 15 |
# File 'lib/archunit/metrics/assertion/custom_metric.rb', line 13 def metric_name @metric_name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
13 14 15 |
# File 'lib/archunit/metrics/assertion/custom_metric.rb', line 13 def value @value end |