Class: ZipCodeJp::Address
- Inherits:
-
Object
- Object
- ZipCodeJp::Address
- Defined in:
- lib/zip_code_jp/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.
-
#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.
-
#town ⇒ Object
readonly
Returns the value of attribute town.
-
#town_kana ⇒ Object
readonly
Returns the value of attribute town_kana.
-
#zip_code ⇒ Object
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.
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
#city ⇒ Object (readonly)
Returns the value of attribute city.
3 4 5 |
# File 'lib/zip_code_jp/address.rb', line 3 def city @city end |
#city_kana ⇒ Object (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 |
#prefecture ⇒ Object (readonly)
Returns the value of attribute prefecture.
3 4 5 |
# File 'lib/zip_code_jp/address.rb', line 3 def prefecture @prefecture end |
#prefecture_code ⇒ Object (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_kana ⇒ Object (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 |
#town ⇒ Object (readonly)
Returns the value of attribute town.
3 4 5 |
# File 'lib/zip_code_jp/address.rb', line 3 def town @town end |
#town_kana ⇒ Object (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_code ⇒ Object (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 |