Module: Kamome::Transformations::Cleaner
- Included in:
- GeneralCsv
- Defined in:
- lib/kamome/transformations/cleaner.rb
Constant Summary collapse
- TOWN_KAN_SUB_RULE =
/(\((?!.カイ\)).+|イカニケイサイガナイバアイ|.+ノツギニバンチガクルバアイ|.+イチエン)$/.freeze
- TOWN_SUB_RULE =
/(((?!.+階)).+|以下に掲載がない場合|.+の次に番地がくる場合|.+一円|)$/.freeze
Class Method Summary collapse
Class Method Details
.clean_town(value) ⇒ Object
14 15 16 |
# File 'lib/kamome/transformations/cleaner.rb', line 14 def clean_town(value) value.sub(TOWN_SUB_RULE, '') end |
.clean_town_kana(value) ⇒ Object
9 10 11 |
# File 'lib/kamome/transformations/cleaner.rb', line 9 def clean_town_kana(value) value.sub(TOWN_KAN_SUB_RULE, '') end |