Class: Optout::Validator::Boolean

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)



544
545
546
547
548
549
# File 'lib/optout.rb', line 544

def validate!(opt)
  if !(opt.value == true || opt.value == false || opt.value.nil?)
    # TODO: Better message
    raise OptionInvalid.new(opt.key, "does not accept an argument")
  end
end