Sha256: 639c94d88472c17f316e15c25951a11c890025f4fbaafd32700f1282e3cf1738
Contents?: true
Size: 400 Bytes
Versions: 3
Compression:
Stored size: 400 Bytes
Contents
# frozen_string_literal: true require 'uuid' 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 UUID_FORMAT = /\A\h{8}(-\h{4}){3}\-\h{12}\z/ UUID = Types::Strict::String.default { ::UUID.generate } .constrained(format: UUID_FORMAT) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
prolog-dry_types-0.3.0 | lib/prolog/dry_types/uuid.rb |
prolog-dry_types-0.2.0 | lib/prolog/dry_types/uuid.rb |
prolog-dry_types-0.1.0 | lib/prolog/dry_types/uuid.rb |