Class: DirtySeed::Assigners::Date

Inherits:
Assigner
  • Object
show all
Defined in:
lib/dirty_seed/assigners/date.rb

Overview

Draws a value matching validators

Instance Attribute Summary

Attributes inherited from Assigner

#attribute

Instance Method Summary collapse

Methods inherited from Assigner

#initialize

Constructor Details

This class inherits a constructor from DirtySeed::Assigners::Assigner

Instance Method Details

#valueDate

Returns a date matching all validators

Returns:



9
10
11
12
13
14
15
# File 'lib/dirty_seed/assigners/date.rb', line 9

def value
  faker_value(
    category: :Date,
    method: :between,
    options: { from: 42.days.ago, to: 42.days.from_now }
  )
end