Class: JapaneseAddressParser::Models::Address
- Inherits:
-
Object
- Object
- JapaneseAddressParser::Models::Address
- Defined in:
- lib/japanese_address_parser/models/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#full_address ⇒ Object
readonly
Returns the value of attribute full_address.
-
#prefecture ⇒ Object
readonly
Returns the value of attribute prefecture.
-
#town ⇒ Object
readonly
Returns the value of attribute town.
Instance Method Summary collapse
- #furigana ⇒ Object
-
#initialize(full_address:, prefecture:, city:, town:) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(full_address:, prefecture:, city:, town:) ⇒ Address
Returns a new instance of Address.
8 9 10 11 12 13 |
# File 'lib/japanese_address_parser/models/address.rb', line 8 def initialize(full_address:, prefecture:, city:, town:) @full_address = full_address @prefecture = prefecture @city = city @town = town end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
6 7 8 |
# File 'lib/japanese_address_parser/models/address.rb', line 6 def city @city end |
#full_address ⇒ Object (readonly)
Returns the value of attribute full_address.
6 7 8 |
# File 'lib/japanese_address_parser/models/address.rb', line 6 def full_address @full_address end |
#prefecture ⇒ Object (readonly)
Returns the value of attribute prefecture.
6 7 8 |
# File 'lib/japanese_address_parser/models/address.rb', line 6 def prefecture @prefecture end |
#town ⇒ Object (readonly)
Returns the value of attribute town.
6 7 8 |
# File 'lib/japanese_address_parser/models/address.rb', line 6 def town @town end |
Instance Method Details
#furigana ⇒ Object
15 16 17 |
# File 'lib/japanese_address_parser/models/address.rb', line 15 def furigana "#{prefecture&.name_kana}#{city&.name_kana}#{town&.name_kana}" end |