Class: Serega::SeregaPlugins::If::CheckOptUnlessValue
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::If::CheckOptUnlessValue
- Defined in:
- lib/serega/plugins/if/validations/check_opt_unless_value.rb
Overview
Validator for attribute :unless_value option
Class Method Summary collapse
-
.call(opts) ⇒ void
Checks attribute :unless_value option that must be [nil, Symbol, Proc, #call].
Class Method Details
.call(opts) ⇒ void
This method returns an undefined value.
Checks attribute :unless_value option that must be [nil, Symbol, Proc, #call]
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 |