Sha256: c4c90c32384cd71735b33d45c312ced0b63c445f62dc797775d791e704a291a4

Contents?: true

Size: 388 Bytes

Versions: 2

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

module DirtySeed
  module Assigners
    module Type
      # Manages time assignments
      class Time < Assigner
        include FakerHelper

        # Returns a random time matching validators
        # @return [Time]
        def value
          ::Faker::Time.between(from: DateTime.now - 42, to: DateTime.now + 42)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dirty_seed-0.2.1 lib/dirty_seed/assigners/type/time.rb
dirty_seed-0.2.0 lib/dirty_seed/assigners/type/time.rb