Exception: Environmentor::Attribute::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Environmentor::Attribute::ValidationError
- Defined in:
- lib/environmentor/attribute.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Missing
Instance Attribute Summary collapse
-
#attr ⇒ Object
readonly
Returns the value of attribute attr.
Instance Method Summary collapse
-
#initialize(attr, mappers, opts, message: "Validation error") ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message(msg = nil) ⇒ Object
Constructor Details
#initialize(attr, mappers, opts, message: "Validation error") ⇒ ValidationError
Returns a new instance of ValidationError.
10 11 12 13 14 15 |
# File 'lib/environmentor/attribute.rb', line 10 def initialize(attr, mappers, opts, message: "Validation error") @attr = attr @mappers = mappers @opts = opts @message = end |
Instance Attribute Details
#attr ⇒ Object (readonly)
Returns the value of attribute attr.
8 9 10 |
# File 'lib/environmentor/attribute.rb', line 8 def attr @attr end |
Instance Method Details
#message(msg = nil) ⇒ Object
17 18 19 |
# File 'lib/environmentor/attribute.rb', line 17 def (msg = nil) decorate_msg(msg || @message) end |