Class: Optout::Validator::Class

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

- (Object) validate!(opt)



536
537
538
539
540
# File 'lib/optout.rb', line 536

def validate!(opt)
  if !opt.empty? && !(setting === opt.value)
    raise OptionInvalid.new(opt.key, "value '#{opt.value}' must be type #{setting}")
  end
end