Sha256: 336e3f84e1711d14f016625a900daa3f27668a02693d66bb9537a5bcdd69bc10

Contents?: true

Size: 518 Bytes

Versions: 7

Compression:

Stored size: 518 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_caster

  # @return [void]
  #
  # @api private
  # @since 0.1.0
  def initialize
    @type_caster = nil
  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

Version Path
smart_types-0.1.0.alpha6 lib/smart_core/types/primitive/mult_factory/definition_context.rb
smart_types-0.1.0.alpha5 lib/smart_core/types/primitive/mult_factory/definition_context.rb
smart_types-0.1.0.alpha4 lib/smart_core/types/primitive/mult_factory/definition_context.rb
smart_types-0.1.0.alpha3 lib/smart_core/types/primitive/mult_factory/definition_context.rb
smart_types-0.1.0.alpha2 lib/smart_core/types/primitive/mult_factory/definition_context.rb
smart_types-0.1.0.alpha lib/smart_core/types/primitive/mult_factory/definition_context.rb
smart_types-0.0.0 lib/smart_core/types/primitive/mult_factory/definition_context.rb