Exception: Praxis::Mapper::Resources::IncompatibleTypeForMethodArguments
- Inherits:
-
StandardError
- Object
- StandardError
- Praxis::Mapper::Resources::IncompatibleTypeForMethodArguments
- Defined in:
- lib/praxis/mapper/resources/typed_methods.rb
Overview
Error raised when trying to call a typed method and the validation of arguments fails
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
-
#initialize(errors:, method:, klass:) ⇒ IncompatibleTypeForMethodArguments
constructor
A new instance of IncompatibleTypeForMethodArguments.
Constructor Details
#initialize(errors:, method:, klass:) ⇒ IncompatibleTypeForMethodArguments
Returns a new instance of IncompatibleTypeForMethodArguments.
10 11 12 13 |
# File 'lib/praxis/mapper/resources/typed_methods.rb', line 10 def initialize(errors:, method:, klass:) @errors = errors super "Error validating/coercing arguments for call to method #{method} of class #{klass}:\n#{errors}" end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
8 9 10 |
# File 'lib/praxis/mapper/resources/typed_methods.rb', line 8 def errors @errors end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
8 9 10 |
# File 'lib/praxis/mapper/resources/typed_methods.rb', line 8 def method @method end |