Sha256: d88604f48b7d8a238b973355a191505e09796cc1feaeeff41e3d37ca0d9ac1bd

Contents?: true

Size: 366 Bytes

Versions: 1

Compression:

Stored size: 366 Bytes

Contents

module Stig
  module Generators
    module Time
      extend self

      DEFAULT_INTERVAL = ::Time.at(0)..::Time.now

      # Public: Generates a random Time.
      #
      # interval - An interval Range (default: Time.at(0)..Time.now).
      #
      # Returns a Time.
      def random(interval = DEFAULT_INTERVAL)
        rand(interval)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stig-0.1.0 lib/stig/generators/time.rb