Class: JpPrefecture::Prefecture::Finder
- Inherits:
-
Object
- Object
- JpPrefecture::Prefecture::Finder
- Defined in:
- lib/jp_prefecture/prefecture/finder.rb
Overview
都道府県の検索を行うクラス
Instance Method Summary collapse
-
#find(field:, value:) ⇒ JpPrefecture::Prefecture?
指定した項目を検索.
-
#initialize ⇒ Finder
constructor
A new instance of Finder.
Constructor Details
Instance Method Details
#find(field:, value:) ⇒ JpPrefecture::Prefecture?
指定した項目を検索
20 21 22 23 |
# File 'lib/jp_prefecture/prefecture/finder.rb', line 20 def find(field:, value:) code = find_code(field, value) JpPrefecture::Prefecture.build_by_code(code) end |