Sha256: 836a04ad58bbeb105e84510a8e125b089fb176f984723327f2415784647d980c
Contents?: true
Size: 837 Bytes
Versions: 7
Compression:
Stored size: 837 Bytes
Contents
# frozen_string_literal: true # @api private # @since 0.1.0 class SmartCore::Types::Primitive::Factory::DefinitionContext # @return [Proc] # # @api private # @since 0.1.0 attr_reader :type_checker # @return [Proc] # # @api private # @since 0.1.0 attr_reader :type_caster # @return [void] # # @api private # @since 0.1.0 def initialize @type_checker = nil @type_caster = nil end # @param checker [Block] # @return [void] # # @api public # @since 0.1.0 def define_checker(&checker) raise 'No checker definition block' unless block_given? @type_checker = checker end # @param caster [Block] # @return [void] # # @api public # @since 0.1.0 def define_caster(&caster) raise 'No caster definition block' unless block_given? @type_caster = caster end end
Version data entries
7 entries across 7 versions & 1 rubygems