Sha256: 70a9909607e6575d76cc6b0b7b091e112f4a28293f4307ddfa115851c411118d

Contents?: true

Size: 489 Bytes

Versions: 5

Compression:

Stored size: 489 Bytes

Contents

# encoding: utf-8

require 'ffaker/address'

module Faker
  module AddressCA
    include Faker::Address

    extend ModuleUtils
    extend self

    POSTAL_CODE_FORMATS = ['?#? #?#']
    PROVINCE_ABBRS = %w(NL NS PE NB QC ON MB SK AB BC YT NT NU)

    def postal_code
      Faker.bothify(POSTAL_CODE_FORMATS.sample).upcase
    end

    def province
      PROVINCE.sample
    end

    def city
      CITY.sample
    end

    def province_abbr
      PROVINCE_ABBRS.sample
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/ffaker-1.32.1/lib/ffaker/address_ca.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/ffaker-1.32.1/lib/ffaker/address_ca.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/ffaker-1.32.1/lib/ffaker/address_ca.rb
ffaker-1.32.1 lib/ffaker/address_ca.rb
ffaker-1.32.0 lib/ffaker/address_ca.rb