Class: Faker::JpPrefecture::Prefecture
- Inherits:
-
Object
- Object
- Faker::JpPrefecture::Prefecture
- Defined in:
- lib/faker/jp_prefecture/prefecture.rb
Class Method Summary collapse
Class Method Details
.all ⇒ Object
5 6 7 8 |
# File 'lib/faker/jp_prefecture/prefecture.rb', line 5 def self.all pref_hash = PREFECTURES.sample prefecture = OpenStruct.new(code: pref_hash[:code], name: pref_hash[:name], name_e: pref_hash[:name_e], name_f: pref_hash[:name_f]) end |