Class: Mayaml::MuttAccountCreds::Validator

Inherits:
Object
  • Object
show all
Includes:
Mainapp::Component
Defined in:
lib/mayaml/mutt_account_creds/validator.rb

Instance Method Summary collapse

Instance Method Details

#validate(data) ⇒ Object



11
12
13
14
15
16
# File 'lib/mayaml/mutt_account_creds/validator.rb', line 11

def validate(data)
  %i[realname name smtp_protocol smtp_server smtp_port smtp_authenticator
    user pass].each do |value|
    raise ArgumentError.new "Missing #{value}" if missing?(data, value)
  end
end