Class: Forgery::Time

Inherits:
Forgery show all
Defined in:
lib/forgery/forgery/time.rb

Overview

Generates random timezone information.

Constant Summary

Constant Summary

Constants inherited from Forgery

VERSION

Class Method Summary (collapse)

Methods inherited from Forgery

Extend, dictionaries, formats, load_from!, load_paths, rails?, rails_root

Class Method Details

+ (Object) zone

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