Exception: Grape::Exceptions::Validation
- Defined in:
- lib/grape/exceptions/validation.rb
Constant Summary
Constants inherited from Base
Base::BASE_ATTRIBUTES_KEY, Base::BASE_MESSAGES_KEY
Instance Attribute Summary collapse
-
#param ⇒ Object
Returns the value of attribute param.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Validation
constructor
A new instance of Validation.
Methods inherited from Base
Constructor Details
#initialize(args = {}) ⇒ Validation
Returns a new instance of Validation.
8 9 10 11 12 13 |
# File 'lib/grape/exceptions/validation.rb', line 8 def initialize(args = {}) @param = args[:param].to_s if args.has_key? :param attribute = translate_attribute(@param) args[:message] = (args[:message_key], :attribute => attribute) super end |
Instance Attribute Details
#param ⇒ Object
Returns the value of attribute param.
6 7 8 |
# File 'lib/grape/exceptions/validation.rb', line 6 def param @param end |