Module: MultiSms::Util

Included in:
MultiSms
Defined in:
lib/multi_sms/util.rb

Instance Method Summary collapse

Instance Method Details

#verify_parameters(parameters, required_parameters) ⇒ Object



3
4
5
6
7
8
# File 'lib/multi_sms/util.rb', line 3

def verify_parameters(parameters, required_parameters)
  missing_parameters = (required_parameters - parameters.keys)
  unless missing_parameters.empty?
    raise MultiSms::MissingParameter, "Requires #{missing_parameters.collect {|s| ":#{s}"}.join(', ')} parameters"
  end
end