Sha256: 50caed43a23dfe0208bd5c3372226bbe008b489846b1c764ee6de47707f330e8
Contents?: true
Size: 823 Bytes
Versions: 8
Compression:
Stored size: 823 Bytes
Contents
module ROM module SQL # Type DSL used by Types.define method # # @api public class TypeDSL attr_reader :definition, :input_constructor, :output_constructor # @api private def initialize(value_type) if value_type.class < ::Dry::Types::Type @definition = value_type else @definition = ::ROM::SQL::Types.Definition(value_type) end end # @api private def call(&block) instance_exec(&block) definition.constructor(input_constructor) .meta(read: definition.constructor(output_constructor)) end # @api private def input(&block) @input_constructor = block end # @api private def output(&block) @output_constructor = block end end end end
Version data entries
8 entries across 8 versions & 1 rubygems