Class: Time

Inherits:
Object show all
Defined in:
lib/ext_core.rb

Class Method Summary collapse

Class Method Details

.generate(*args) ⇒ Object



209
210
211
212
213
214
215
# File 'lib/ext_core.rb', line 209

def self.generate(*args)
  if args.empty?
    Time.at(Faker::Number.between(0, Time.now.to_i))
  else
    Faker::Time.between(*args)
  end.to_time
end