Sha256: 64cfa631a0e36436d87b1e13ab3645ec4ea3e292cbfb57202304229ef71962b1

Contents?: true

Size: 371 Bytes

Versions: 14

Compression:

Stored size: 371 Bytes

Contents

module Barometer
  #
  # Format: Zip Code (short)
  #
  # eg. 90210
  #
  # This class is used to determine if a query is a
  # :short_zipcode and what the country_code is.
  #
  class Query::Format::ShortZipcode < Query::Format
  
    def self.format; :short_zipcode; end
    def self.country_code(query=nil); "US"; end
    def self.regex; /(^[0-9]{5}$)/; end

  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
attack-barometer-0.5.0 lib/barometer/formats/short_zipcode.rb
attack-barometer-0.6.0 lib/barometer/formats/short_zipcode.rb
attack-barometer-0.6.1 lib/barometer/formats/short_zipcode.rb
barometer-0.7.3 lib/barometer/formats/short_zipcode.rb
barometer-0.7.2 lib/barometer/formats/short_zipcode.rb
barometer-0.7.1 lib/barometer/formats/short_zipcode.rb
barometer-0.7.0 lib/barometer/formats/short_zipcode.rb
barometer-0.6.7 lib/barometer/formats/short_zipcode.rb
barometer-0.6.6 lib/barometer/formats/short_zipcode.rb
barometer-0.6.4 lib/barometer/formats/short_zipcode.rb
barometer-0.6.3 lib/barometer/formats/short_zipcode.rb
barometer-0.6.2 lib/barometer/formats/short_zipcode.rb
barometer-0.6.1 lib/barometer/formats/short_zipcode.rb
barometer-0.5.0 lib/barometer/formats/short_zipcode.rb