Class: Serega::SeregaPlugins::If::CheckOptUnless

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/plugins/if/validations/check_opt_unless.rb

Overview

Validator for attribute :unless option

Class Method Summary collapse

Class Method Details

.call(opts) ⇒ void

This method returns an undefined value.

Checks attribute :unless option that must be [nil, Symbol, Proc, #call]

Parameters:

  • opts (Hash)

    Attribute options

Raises:



20
21
22
23
24
# File 'lib/serega/plugins/if/validations/check_opt_unless.rb', line 20

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

  check_type(opts[:unless])
end