Class: Kangaru::Validation::Error
- Inherits:
-
Object
- Object
- Kangaru::Validation::Error
- Defined in:
- lib/kangaru/validation/error.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #full_message ⇒ Object
-
#initialize(attribute:, message:) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(attribute:, message:) ⇒ Error
Returns a new instance of Error.
8 9 10 11 |
# File 'lib/kangaru/validation/error.rb', line 8 def initialize(attribute:, message:) @attribute = attribute @message = end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
6 7 8 |
# File 'lib/kangaru/validation/error.rb', line 6 def attribute @attribute end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/kangaru/validation/error.rb', line 6 def @message end |
Instance Method Details
#full_message ⇒ Object
13 14 15 |
# File 'lib/kangaru/validation/error.rb', line 13 def [human_attribute, ].join(" ") end |