Sha256: d28c091d62e40c0f59223c0f1d967dcfcb0043adc890f2c72348dda0285deb01

Contents?: true

Size: 923 Bytes

Versions: 4

Compression:

Stored size: 923 Bytes

Contents

# encoding: utf-8

require 'ffaker/address'

module FFaker
  module AddressIN
    include FFaker::Address

    extend ModuleUtils
    extend self

    ZIP_FORMATS = ['######'].freeze

    def pincode
      FFaker.numerify(fetch_sample(ZIP_FORMATS))
    end

    alias zip_code pincode

    def state
      fetch_sample(STATE)
    end

    def state_abbr
      fetch_sample(STATE_ABBR)
    end

    def union_territory
      fetch_sample(UNION_TERRITORY)
    end

    def union_territory_abbr
      fetch_sample(UNION_TERRITORY_ABBR)
    end

    def state_and_union_territory
      fetch_sample(STATE + UNION_TERRITORY)
    end

    def state_and_union_territory_abbr
      fetch_sample(STATE_ABBR + UNION_TERRITORY_ABBR)
    end

    def country
      FFaker::Address.country('IN')
    end

    def country_code
      FFaker::Address.country_code('India')
    end

    def time_zone
      'Asia/Kolkata'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ffaker-2.6.0 lib/ffaker/address_in.rb
ffaker-2.5.0 lib/ffaker/address_in.rb
ffaker-2.4.0 lib/ffaker/address_in.rb
ffaker-2.3.0 lib/ffaker/address_in.rb