Class: Amdapi::ParamsValidator
- Inherits:
-
Object
- Object
- Amdapi::ParamsValidator
- Defined in:
- lib/amdapi/validation.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ ParamsValidator
constructor
A new instance of ParamsValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(params) ⇒ ParamsValidator
Returns a new instance of ParamsValidator.
3 4 5 |
# File 'lib/amdapi/validation.rb', line 3 def initialize(params) @params = params end |
Instance Method Details
#valid? ⇒ Boolean
7 8 9 10 |
# File 'lib/amdapi/validation.rb', line 7 def valid? symbolize_keys params_keys.all? { |key| params[key] } end |