Class: Serega::SeregaPlugins::If::CheckOptUnlessValue

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

Overview

Validator for attribute :unless_value option

Class Method Summary collapse

Class Method Details

.call(opts) ⇒ void

This method returns an undefined value.

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

Parameters:

  • opts (Hash)

    Attribute options

Raises:



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

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

  check_usage_with_other_params(opts)
  check_type(opts[:unless_value])
end