Class: Jpostcode::Address
- Inherits:
-
Object
- Object
- Jpostcode::Address
- Defined in:
- lib/jpostcode/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#city_kana ⇒ Object
readonly
Returns the value of attribute city_kana.
-
#office_name ⇒ Object
readonly
Returns the value of attribute office_name.
-
#office_name_kana ⇒ Object
readonly
Returns the value of attribute office_name_kana.
-
#prefecture ⇒ Object
readonly
Returns the value of attribute prefecture.
-
#prefecture_code ⇒ Object
readonly
Returns the value of attribute prefecture_code.
-
#prefecture_kana ⇒ Object
readonly
Returns the value of attribute prefecture_kana.
-
#street ⇒ Object
readonly
Returns the value of attribute street.
-
#town ⇒ Object
readonly
Returns the value of attribute town.
-
#town_kana ⇒ Object
readonly
Returns the value of attribute town_kana.
-
#zip_code ⇒ Object
(also: #postcode)
readonly
Returns the value of attribute zip_code.
Instance Method Summary collapse
-
#initialize(data) ⇒ Address
constructor
A new instance of Address.
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
#city ⇒ Object (readonly)
Returns the value of attribute city.
5 6 7 |
# File 'lib/jpostcode/address.rb', line 5 def city @city end |
#city_kana ⇒ Object (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_name ⇒ Object (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_kana ⇒ Object (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 |
#prefecture ⇒ Object (readonly)
Returns the value of attribute prefecture.
5 6 7 |
# File 'lib/jpostcode/address.rb', line 5 def prefecture @prefecture end |
#prefecture_code ⇒ Object (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_kana ⇒ Object (readonly)
Returns the value of attribute prefecture_kana.
5 6 7 |
# File 'lib/jpostcode/address.rb', line 5 def prefecture_kana @prefecture_kana end |
#street ⇒ Object (readonly)
Returns the value of attribute street.
5 6 7 |
# File 'lib/jpostcode/address.rb', line 5 def street @street end |
#town ⇒ Object (readonly)
Returns the value of attribute town.
5 6 7 |
# File 'lib/jpostcode/address.rb', line 5 def town @town end |
#town_kana ⇒ Object (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_code ⇒ Object (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 |