Class: Suretax::Concerns::Validatable::Error
- Inherits:
-
Object
- Object
- Suretax::Concerns::Validatable::Error
- Defined in:
- lib/suretax/concerns/validatable.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#message ⇒ Object
Returns the value of attribute message.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attribute, value) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(attribute, value) ⇒ Error
Returns a new instance of Error.
25 26 27 28 29 |
# File 'lib/suretax/concerns/validatable.rb', line 25 def initialize(attribute, value) self.value = value self.attribute = attribute self. = "Invalid #{attribute}: #{reason}" end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
23 24 25 |
# File 'lib/suretax/concerns/validatable.rb', line 23 def attribute @attribute end |
#message ⇒ Object
Returns the value of attribute message.
23 24 25 |
# File 'lib/suretax/concerns/validatable.rb', line 23 def @message end |
#value ⇒ Object
Returns the value of attribute value.
23 24 25 |
# File 'lib/suretax/concerns/validatable.rb', line 23 def value @value end |