Sha256: 3566d07c1026ba4d2739b05e9e7c95b41cfa7c28bc9f95da9da4a5013f7ee734
Contents?: true
Size: 503 Bytes
Versions: 19
Compression:
Stored size: 503 Bytes
Contents
require 'dry-types' module ROM module Types include Dry::Types.module def self.included(other) other.extend(Methods) super end def self.Definition(primitive) Dry::Types::Definition.new(primitive) end def self.Constructor(primitive, &block) Types.Definition(primitive).constructor(&block) end module Methods def ForeignKey(relation, type = Types::Int) type.meta(foreign_key: true, target: relation) end end end end
Version data entries
19 entries across 19 versions & 2 rubygems