Class: Serega::SeregaValidations::Attribute::CheckOptHashAccess

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/validations/attribute/check_opt_hash_access.rb

Overview

Attribute :hash_access option validator

Class Method Summary collapse

Class Method Details

.call(opts) ⇒ void

This method returns an undefined value.

Checks attribute :hash_access option

Parameters:

  • opts (Hash)

    Attribute options

Raises:



23
24
25
26
27
28
29
# File 'lib/serega/validations/attribute/check_opt_hash_access.rb', line 23

def call(opts)
  return unless opts.key?(:hash_access)

  value = opts[:hash_access]
  check_value(value)
  check_usage_with_other_params(opts) if value
end