Class: Serega::SeregaPlugins::Preloads::CheckOptPreload
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Preloads::CheckOptPreload
- Defined in:
- lib/serega/plugins/preloads/validations/check_opt_preload.rb
Overview
Validator for attribute :preload option
Class Method Summary collapse
-
.call(opts) ⇒ void
Checks :preload option.
Class Method Details
.call(opts) ⇒ void
This method returns an undefined value.
Checks :preload option
19 20 21 22 23 |
# File 'lib/serega/plugins/preloads/validations/check_opt_preload.rb', line 19 def call(opts) return unless opts.key?(:preload) raise SeregaError, "Option :preload can not be used together with option :const" if opts.key?(:const) end |