Class: Strict::AssignmentError
Instance Attribute Summary collapse
-
#invalid_attribute ⇒ Object
readonly
Returns the value of attribute invalid_attribute.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(assignable_class:, invalid_attribute:, value:) ⇒ AssignmentError
constructor
A new instance of AssignmentError.
Constructor Details
#initialize(assignable_class:, invalid_attribute:, value:) ⇒ AssignmentError
Returns a new instance of AssignmentError.
7 8 9 10 11 12 |
# File 'lib/strict/assignment_error.rb', line 7 def initialize(assignable_class:, invalid_attribute:, value:) super((assignable_class: assignable_class, invalid_attribute: invalid_attribute, value: value)) @invalid_attribute = invalid_attribute @value = value end |
Instance Attribute Details
#invalid_attribute ⇒ Object (readonly)
Returns the value of attribute invalid_attribute.
5 6 7 |
# File 'lib/strict/assignment_error.rb', line 5 def invalid_attribute @invalid_attribute end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/strict/assignment_error.rb', line 5 def value @value end |