Class: ZipCodeJp::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/zip_code_jp/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Address

Returns a new instance of Address.



6
7
8
9
10
11
12
13
14
15
# File 'lib/zip_code_jp/address.rb', line 6

def initialize(data)
  @zip_code        = data['zip_code']
  @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']
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def city
  @city
end

#city_kanaObject (readonly)

Returns the value of attribute city_kana.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def city_kana
  @city_kana
end

#prefectureObject (readonly)

Returns the value of attribute prefecture.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def prefecture
  @prefecture
end

#prefecture_codeObject (readonly)

Returns the value of attribute prefecture_code.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def prefecture_code
  @prefecture_code
end

#prefecture_kanaObject (readonly)

Returns the value of attribute prefecture_kana.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def prefecture_kana
  @prefecture_kana
end

#townObject (readonly)

Returns the value of attribute town.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def town
  @town
end

#town_kanaObject (readonly)

Returns the value of attribute town_kana.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def town_kana
  @town_kana
end

#zip_codeObject (readonly)

Returns the value of attribute zip_code.



3
4
5
# File 'lib/zip_code_jp/address.rb', line 3

def zip_code
  @zip_code
end