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
Class Method Summary collapse
-
.call(opts) ⇒ void
Checks attribute :after_hide_if option.
Class Method Details
.call(opts) ⇒ void
This method returns an undefined value.
Checks attribute :after_hide_if option
18 19 20 21 22 23 24 25 |
# File 'lib/serega/plugins/metadata/validations/check_opt_hide_empty.rb', line 18 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 |