Class: Serega::SeregaPlugins::Metadata::MetaAttribute::CheckOpts

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/plugins/metadata/validations/check_opts.rb

Overview

Validator for meta_attribute options

Class Method Summary collapse

Class Method Details

.call(opts, block, allowed_keys) ⇒ void

This method returns an undefined value.

Validates meta_attribute options Checks used options are allowed and then checks options values.

Parameters:

  • opts (Hash)

    Attribute options

  • block (Proc)

    Attribute block

  • allowed_keys (Array<Symbol>)

    Allowed options keys

Raises:



24
25
26
27
28
# File 'lib/serega/plugins/metadata/validations/check_opts.rb', line 24

def call(opts, block, allowed_keys)
  check_allowed_options_keys(opts, allowed_keys)
  check_each_opt(opts, block)
  check_any_value_provided(opts, block)
end