Sha256: 5ef996a184948cb35b147a85e256a5c5a0adc5e2c63c5f9d2a2afa688633f229

Contents?: true

Size: 259 Bytes

Versions: 9

Compression:

Stored size: 259 Bytes

Contents

# Generates random timezone information.
class Forgery::Time < Forgery

  # Gets a random timezone out of the 'timezones' dictionary
  #
  #   Forgery(:timezone).timezone
  #   # => "Sydney"
  def self.zone
    dictionaries[:zones].random.unextend
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
forgery-0.8.1 lib/forgery/forgery/time.rb
forgery-0.7.0 lib/forgery/forgery/time.rb
forgery-0.6.0 lib/forgery/forgery/time.rb
forgery-0.5.0 lib/forgery/forgery/time.rb
forgery-0.4.4 lib/forgery/forgery/time.rb
forgery-0.4.3 lib/forgery/forgery/time.rb
forgery-0.4.2 lib/forgery/forgery/time.rb
forgery-0.4.1 lib/forgery/forgery/time.rb
forgery-0.4.0 lib/forgery/forgery/time.rb