Class: Forgery::Time
Overview
Generates random timezone information.
Constant Summary
Constants inherited from Forgery
Class Method Summary collapse
-
.zone ⇒ Object
Gets a random timezone out of the ‘timezones’ dictionary.
Methods inherited from Forgery
Extend, dictionaries, formats, load_from!, load_paths, rails?, rails_root
Class Method Details
.zone ⇒ Object
Gets a random timezone out of the ‘timezones’ dictionary
Forgery(:timezone).timezone
# => "Sydney"
8 9 10 |
# File 'lib/forgery/forgery/time.rb', line 8 def self.zone dictionaries[:zones].random.unextend end |