Sha256: 870f1eaa1ab8064fd0451db2eb855a4034f4d6f428172797240ee52b0d04517d

Contents?: true

Size: 816 Bytes

Versions: 68

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

module Jpostcode
  class Address
    attr_reader :zip_code, :prefecture, :prefecture_kana, :prefecture_code,
                :city, :city_kana, :town, :town_kana, :street,
                :office_name, :office_name_kana

    alias postcode zip_code

    def initialize(data)
      @zip_code         = data['postcode']
      @prefecture       = data['prefecture']
      @prefecture_kana  = data['prefecture_kana']
      @prefecture_code  = data['prefecture_code']
      @city             = data['city']
      @city_kana        = data['city_kana']
      @town             = data['town']
      @town_kana        = data['town_kana']
      @street           = data['street']
      @office_name      = data['office_name']
      @office_name_kana = data['office_name_kana']
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
jpostcode-1.0.0.20241101 lib/jpostcode/address.rb
jpostcode-1.0.0.20241001 lib/jpostcode/address.rb
jpostcode-1.0.0.20240901 lib/jpostcode/address.rb
jpostcode-1.0.0.20240807 lib/jpostcode/address.rb
jpostcode-1.0.0.20240703 lib/jpostcode/address.rb
jpostcode-1.0.0.20240701 lib/jpostcode/address.rb
jpostcode-1.0.0.20240601 lib/jpostcode/address.rb
jpostcode-1.0.0.20240401 lib/jpostcode/address.rb
jpostcode-1.0.0.20240301 lib/jpostcode/address.rb
jpostcode-1.0.0.20240201 lib/jpostcode/address.rb
jpostcode-1.0.0.20240101 lib/jpostcode/address.rb
jpostcode-1.0.0.20231201 lib/jpostcode/address.rb
jpostcode-1.0.0.20231101 lib/jpostcode/address.rb
jpostcode-1.0.0.20231001 lib/jpostcode/address.rb
jpostcode-1.0.0.20230901 lib/jpostcode/address.rb
jpostcode-1.0.0.20230801 lib/jpostcode/address.rb
jpostcode-1.0.0.20230701 lib/jpostcode/address.rb
jpostcode-1.0.0.20230601 lib/jpostcode/address.rb
jpostcode-1.0.0.20230501 lib/jpostcode/address.rb
jpostcode-1.0.0.20230401 lib/jpostcode/address.rb