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.
28 29 30 31 32 |
# File 'lib/suretax/concerns/validatable.rb', line 28 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.
26 27 28 |
# File 'lib/suretax/concerns/validatable.rb', line 26 def attribute @attribute end |
#message ⇒ Object
Returns the value of attribute message.
26 27 28 |
# File 'lib/suretax/concerns/validatable.rb', line 26 def @message end |
#value ⇒ Object
Returns the value of attribute value.
26 27 28 |
# File 'lib/suretax/concerns/validatable.rb', line 26 def value @value end |