module CanadaPost::Helpers

Private Instance Methods

requires!(hash, *params) click to toggle source

Helper method to validate required fields

# File lib/canada_post/helpers.rb, line 6
def requires!(hash, *params)
   params.each { |param| raise RateError, "Missing Required Parameter #{param}" if hash[param].nil? }
end