Class: Randgen
- Inherits:
-
Object
- Object
- Randgen
- Defined in:
- lib/attributor/types/uri.rb,
lib/attributor/extensions/randexp.rb
Constant Summary collapse
- DATE_TIME_EPOCH =
::DateTime.new(2015, 1, 1, 0, 0, 0)
Class Method Summary collapse
Class Method Details
.date ⇒ Object
6 7 8 |
# File 'lib/attributor/extensions/randexp.rb', line 6 def self.date DATE_TIME_EPOCH - rand(800) end |
.time ⇒ Object
10 11 12 |
# File 'lib/attributor/extensions/randexp.rb', line 10 def self.time date.to_time end |
.uri ⇒ Object
71 72 73 |
# File 'lib/attributor/types/uri.rb', line 71 def self.uri "http://example.com/#{word}/#{rand(10**9)}" end |