Class: Strict::Violation
- Inherits:
-
Data
- Object
- Data
- Strict::Violation
- Defined in:
- lib/strict/violation.rb,
sig/strict.rbs
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#validator ⇒ Object
readonly
Returns the value of attribute validator.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(path:, code:, value:, validator:) ⇒ Violation
constructor
A new instance of Violation.
Constructor Details
#initialize(path:, code:, value:, validator:) ⇒ Violation
Returns a new instance of Violation.
5 6 7 |
# File 'lib/strict/violation.rb', line 5 def initialize(path:, code:, value:, validator:) super(path: path.dup.freeze, code: code, value: value, validator: validator) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
4 5 6 |
# File 'lib/strict/violation.rb', line 4 def code @code end |
#path ⇒ Object (readonly)
Returns the value of attribute path
4 5 6 |
# File 'lib/strict/violation.rb', line 4 def path @path end |
#validator ⇒ Object (readonly)
Returns the value of attribute validator
4 5 6 |
# File 'lib/strict/violation.rb', line 4 def validator @validator end |
#value ⇒ Object (readonly)
Returns the value of attribute value
4 5 6 |
# File 'lib/strict/violation.rb', line 4 def value @value end |