Module: Zuck::Helpers

Included in:
AdKeyword, TargetingSpec
Defined in:
lib/zuck/helpers.rb

Instance Method Summary collapse

Instance Method Details

#normalize_array(arr) ⇒ Object



3
4
5
# File 'lib/zuck/helpers.rb', line 3

def normalize_array(arr)
  [arr].flatten.compact.map(&:to_s).uniq.sort
end

#normalize_countries(countries) ⇒ Object



7
8
9
# File 'lib/zuck/helpers.rb', line 7

def normalize_countries(countries)
  normalize_array(countries).map(&:upcase)
end