Exception: RailsSimpleParams::InvalidParameter
- Inherits:
-
StandardError
- Object
- StandardError
- RailsSimpleParams::InvalidParameter
- Defined in:
- lib/rails_simple_params/exceptions.rb
Direct Known Subclasses
EmptyParameter, InvalidFormat, InvalidIdentity, InvalidOption, InvalidType, MissingParameter, OutOfRange, TooLarge, TooLong, TooShort, TooSmall
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#param ⇒ Object
Returns the value of attribute param.
Instance Method Summary collapse
-
#initialize(message, param: nil, options: {}) ⇒ InvalidParameter
constructor
A new instance of InvalidParameter.
- #message ⇒ Object
Constructor Details
#initialize(message, param: nil, options: {}) ⇒ InvalidParameter
Returns a new instance of InvalidParameter.
7 8 9 10 11 |
# File 'lib/rails_simple_params/exceptions.rb', line 7 def initialize(, param: nil, options: {}) self.param = param self. = super() end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/rails_simple_params/exceptions.rb', line 5 def @options end |
#param ⇒ Object
Returns the value of attribute param.
5 6 7 |
# File 'lib/rails_simple_params/exceptions.rb', line 5 def param @param end |
Instance Method Details
#message ⇒ Object
13 14 15 16 17 |
# File 'lib/rails_simple_params/exceptions.rb', line 13 def return [:message] if .is_a?(Hash) && .key?(:message) super end |