Class: JapaneseAddressParser::Models::Town

Inherits:
Object
  • Object
show all
Defined in:
lib/japanese_address_parser/models/town.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, name_kana:, name_romaji:, nickname:, latitude:, longitude:) ⇒ Town

Returns a new instance of Town.



8
9
10
11
12
13
14
15
# File 'lib/japanese_address_parser/models/town.rb', line 8

def initialize(name:, name_kana:, name_romaji:, nickname:, latitude:, longitude:)
  @name = name
  @name_kana = name_kana
  @name_romaji = name_romaji
  @nickname = nickname
  @latitude = latitude
  @longitude = longitude
end

Instance Attribute Details

#latitudeObject (readonly)

Returns the value of attribute latitude.



6
7
8
# File 'lib/japanese_address_parser/models/town.rb', line 6

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



6
7
8
# File 'lib/japanese_address_parser/models/town.rb', line 6

def longitude
  @longitude
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/japanese_address_parser/models/town.rb', line 6

def name
  @name
end

#name_kanaObject (readonly)

Returns the value of attribute name_kana.



6
7
8
# File 'lib/japanese_address_parser/models/town.rb', line 6

def name_kana
  @name_kana
end

#name_romajiObject (readonly)

Returns the value of attribute name_romaji.



6
7
8
# File 'lib/japanese_address_parser/models/town.rb', line 6

def name_romaji
  @name_romaji
end

#nicknameObject (readonly)

Returns the value of attribute nickname.



6
7
8
# File 'lib/japanese_address_parser/models/town.rb', line 6

def nickname
  @nickname
end

Instance Method Details

#attributesObject



17
18
19
# File 'lib/japanese_address_parser/models/town.rb', line 17

def attributes
  { name: name, name_kana: name_kana, name_romaji: name_romaji, nickname: nickname, latitude: latitude, longitude: longitude }
end