Class: Serega::SeregaPlugins::Metadata::MetaAttribute::CheckOptHideNil
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Metadata::MetaAttribute::CheckOptHideNil
- Defined in:
- lib/serega/plugins/metadata/validations/check_opt_hide_nil.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_nil.rb', line 18 def call(opts) return unless opts.key?(:hide_nil) value = opts[:hide_nil] return if value == true raise SeregaError, "Invalid option :hide_nil => #{value.inspect}. Must be true" end |