Class: Seahorse::Client::ParamValidator
- Inherits:
-
Object
- Object
- Seahorse::Client::ParamValidator
- Defined in:
- lib/seahorse/client/param_validator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(shape) ⇒ ParamValidator
constructor
A new instance of ParamValidator.
- #validate!(params) ⇒ void
Constructor Details
Class Method Details
.validate!(shape, params) ⇒ void
This method returns an undefined value.
8 9 10 |
# File 'lib/seahorse/client/param_validator.rb', line 8 def self.validate!(shape, params) new(shape).validate!(params) end |
Instance Method Details
#validate!(params) ⇒ void
This method returns an undefined value.
19 20 21 22 23 |
# File 'lib/seahorse/client/param_validator.rb', line 19 def validate!(params) errors = [] shape(@shape, params, errors, context = 'params') raise ArgumentError, (errors) unless errors.empty? end |