Class: Barometer::Query::Format::Zipcode

Inherits:
Base
  • Object
show all
Defined in:
lib/barometer/query/formats/zipcode.rb

Overview

eg. 90210 or 90210-5555

Class Method Summary (collapse)

Methods inherited from Base

convert_query, is?

Class Method Details

+ (Object) geo(query)



8
# File 'lib/barometer/query/formats/zipcode.rb', line 8

def self.geo(query); {country_code: 'US'}; end

+ (Object) regex



9
# File 'lib/barometer/query/formats/zipcode.rb', line 9

def self.regex; /(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)/; end