Class: Castle::Validators::Present
- Inherits:
-
Object
- Object
- Castle::Validators::Present
- Defined in:
- lib/castle/validators/present.rb
Overview
Checks if required keys are present
Class Method Summary collapse
Class Method Details
.call(options, keys) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/castle/validators/present.rb', line 8 def call(, keys) keys.each do |key| next unless [key].to_s.empty? raise Castle::InvalidParametersError, "#{key} is missing or empty" end end |