Class: Serega::SeregaPlugins::Metadata::MetaAttribute::CheckOptHideEmpty
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Metadata::MetaAttribute::CheckOptHideEmpty
- Defined in:
- lib/serega/plugins/metadata/validations/check_opt_hide_empty.rb
Overview
Validator for meta_attribute :hide_empty option
Class Method Summary collapse
-
.call(opts) ⇒ void
Checks attribute :hide_empty option.
Class Method Details
.call(opts) ⇒ void
This method returns an undefined value.
Checks attribute :hide_empty option
21 22 23 24 25 26 27 28 |
# File 'lib/serega/plugins/metadata/validations/check_opt_hide_empty.rb', line 21 def call(opts) return unless opts.key?(:hide_empty) value = opts[:hide_empty] return if value == true raise SeregaError, "Invalid option :hide_empty => #{value.inspect}. Must be true" end |