Class: Mayaml::MuttAccountAlternates::Validator
- Inherits:
-
Object
- Object
- Mayaml::MuttAccountAlternates::Validator
- Includes:
- Mainapp::Component
- Defined in:
- lib/mayaml/mutt_account_alternates/validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(data) ⇒ Object
11 12 13 14 15 |
# File 'lib/mayaml/mutt_account_alternates/validator.rb', line 11 def validate(data) raise ArgumentError.new "Missing accounts value" if data.nil? raise ArgumentError.new "Invalid accounts value" unless data.is_a? Array raise ArgumentError.new "Empty accounts value" if data.empty? end |