Class: Date

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

Class Method Summary collapse

Class Method Details

.generate(*args) ⇒ Object



199
200
201
202
203
204
205
# File 'lib/ext_core.rb', line 199

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