Class: Optout::Validator::Required

Inherits:
Base
  • Object
show all
Defined in:
lib/optout.rb

Instance Attribute Summary

Attributes inherited from Base

#setting

Instance Method Summary collapse

Instance Method Details

#validate!(opt) ⇒ Object



502
503
504
505
506
# File 'lib/optout.rb', line 502

def validate!(opt)
  if opt.empty? && option_required?
    raise OptionRequired, opt.key
  end
end