Class: Jpostcode::Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Address

Returns a new instance of Address.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/jpostcode/address.rb', line 11

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

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def city
  @city
end

#city_kanaObject (readonly)

Returns the value of attribute city_kana.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def city_kana
  @city_kana
end

#office_nameObject (readonly)

Returns the value of attribute office_name.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def office_name
  @office_name
end

#office_name_kanaObject (readonly)

Returns the value of attribute office_name_kana.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def office_name_kana
  @office_name_kana
end

#prefectureObject (readonly)

Returns the value of attribute prefecture.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def prefecture
  @prefecture
end

#prefecture_codeObject (readonly)

Returns the value of attribute prefecture_code.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def prefecture_code
  @prefecture_code
end

#prefecture_kanaObject (readonly)

Returns the value of attribute prefecture_kana.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def prefecture_kana
  @prefecture_kana
end

#streetObject (readonly)

Returns the value of attribute street.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def street
  @street
end

#townObject (readonly)

Returns the value of attribute town.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def town
  @town
end

#town_kanaObject (readonly)

Returns the value of attribute town_kana.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def town_kana
  @town_kana
end

#zip_codeObject (readonly) Also known as: postcode

Returns the value of attribute zip_code.



5
6
7
# File 'lib/jpostcode/address.rb', line 5

def zip_code
  @zip_code
end