Class: Castle::Validators::NotSupported

Inherits:
Object
  • Object
show all
Defined in:
lib/castle/validators/not_supported.rb

Overview

Checks if required keys are supported

Class Method Summary collapse

Class Method Details

.call(options, keys) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/castle/validators/not_supported.rb', line 8

def call(options, keys)
  keys.each do |key|
    next unless options.key?(key)

    raise Castle::InvalidParametersError, "#{key} is/are not supported"
  end
end