Class: JapaneseAddressParser::CacheRegexes::TownAlias

Inherits:
Data
  • Object
show all
Defined in:
lib/japanese_address_parser/cache_regexes.rb,
lib/japanese_address_parser/cache_regexes.rb,
sig/cache_regexes.rbs

Overview

「○○町」の省略エイリアス。JS では SingleMachiAza に originalTown を生やした部分オブジェクト。 machi_aza_name は oaza_cho(町を除いた名前)を返す(chome/koaza は持たない)。

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#machiaza_idObject (readonly)

Returns the value of attribute machiaza_id

Returns:

  • (Object)

    the current value of machiaza_id



25
26
27
# File 'lib/japanese_address_parser/cache_regexes.rb', line 25

def machiaza_id
  @machiaza_id
end

#oaza_choObject (readonly)

Returns the value of attribute oaza_cho

Returns:

  • (Object)

    the current value of oaza_cho



25
26
27
# File 'lib/japanese_address_parser/cache_regexes.rb', line 25

def oaza_cho
  @oaza_cho
end

#original_townObject (readonly)

Returns the value of attribute original_town

Returns:

  • (Object)

    the current value of original_town



25
26
27
# File 'lib/japanese_address_parser/cache_regexes.rb', line 25

def original_town
  @original_town
end

#pointObject (readonly)

Returns the value of attribute point

Returns:

  • (Object)

    the current value of point



25
26
27
# File 'lib/japanese_address_parser/cache_regexes.rb', line 25

def point
  @point
end

Class Method Details

.newinstance

Parameters:

  • machiaza_id: (String)
  • point: ([Float, Float], nil)
  • oaza_cho: (String)
  • original_town: (Data::SingleMachiAza)

Returns:

  • (instance)


12
# File 'sig/cache_regexes.rbs', line 12

def self.new: (machiaza_id: String, point: [Float, Float]?, oaza_cho: String, original_town: Data::SingleMachiAza) -> instance

Instance Method Details

#machi_aza_nameString

JS: machiAzaName(town) 相当。エイリアスは oaza_cho(町を除いた名前)のみを持つ。

Returns:

  • (String)


30
31
32
# File 'lib/japanese_address_parser/cache_regexes.rb', line 30

def machi_aza_name
  oaza_cho
end