Sha256: 19fee088d0bf8aee72ffca450c2a384a2c768f1becd8e42ac45684edf6eb3d64

Contents?: true

Size: 271 Bytes

Versions: 3

Compression:

Stored size: 271 Bytes

Contents

# frozen_string_literal: true

require 'dry-types'

# `Types` as a top-level namespace module seems to be a `dry-types` convention.
module Types
  include Dry::Types.module # should have already been included

  TimeOrNow = Types::Strict::Time.default { ::Time.now }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prolog-dry_types-0.3.0 lib/prolog/dry_types/time_or_now.rb
prolog-dry_types-0.2.0 lib/prolog/dry_types/time_or_now.rb
prolog-dry_types-0.1.0 lib/prolog/dry_types/time_or_now.rb