Class: DateTime

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

Class Method Summary collapse

Class Method Details

.generate(*args) ⇒ Object



189
190
191
192
193
194
195
# File 'lib/ext_core.rb', line 189

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