Sha256: 4be4186de3a2048b6561df245a6aa97c7ffa74ce782c3f26e8e35a6d61572c05

Contents?: true

Size: 447 Bytes

Versions: 6

Compression:

Stored size: 447 Bytes

Contents

# encoding: utf-8

require 'ffaker/address'

module Faker
  module AddressCA
    include Faker::Address

    extend ModuleUtils
    extend self

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

    def province
      PROVINCE.rand
    end

    def province_abbr
      PROVINCE_ABBRS.rand
    end

    POSTAL_CODE_FORMATS = k ['?#? #?#']

    PROVINCE_ABBRS = k %w(NL NS PE NB QC ON MB SK AB BC YT NT NU)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffaker-1.30.0 lib/ffaker/address_ca.rb
ffaker-1.25.0 lib/ffaker/address_ca.rb
ffaker-1.24.0 lib/ffaker/address_ca.rb
ffaker-1.23.0 lib/ffaker/address_ca.rb
ffaker-1.22.1 lib/ffaker/address_ca.rb
ffaker-1.22.0 lib/ffaker/address_ca.rb