Sha256: dbc207c6e753c7c1155f8bed96bebe00d9b91afc457135b9f436901de5f22071

Contents?: true

Size: 1.99 KB

Versions: 39

Compression:

Stored size: 1.99 KB

Contents

module MessagePack
  #
  # MessagePack::Factory is a class to generate Packer and Unpacker which has
  # same set of ext types.
  #
  class Factory
    #
    # Creates a MessagePack::Factory instance
    #
    def initialize
    end

    #
    # Creates a MessagePack::Packer instance, which has ext types already registered.
    # Options are passed to MessagePack::Packer#initialized.
    #
    # See also Packer#initialize for options.
    #
    def packer(*args)
    end

    #
    # Creates a MessagePack::Unpacker instance, which has ext types already registered.
    # Options are passed to MessagePack::Unpacker#initialized.
    #
    # See also Unpacker#initialize for options.
    #
    def unpacker(*args)
    end

    #
    # Register a type and Class to be registered for packer and/or unpacker.
    # If options are not speicified, factory will use :to_msgpack_ext for packer, and
    # :from_msgpack_ext for unpacker.
    #
    # @param type [Fixnum] type id of registered Class (0-127)
    # @param klass [Class] Class to be associated with type id
    # @param options [Hash] specify method name or Proc which are used by packer/unpacker
    # @return nil
    #
    # Supported options:
    #
    # * *:packer* specify symbol or proc object for packer
    # * *:unpacker* specify symbol or proc object for unpacker
    #
    def register_type(type, klass, options={})
    end

    #
    # Returns a list of registered types, ordered by type id.
    #
    # @param selector [Symbol] specify to list types registered for :packer, :unpacker or :both (default)
    # @return Array
    #
    def registered_types(selector=:both)
    end

    #
    # Returns true/false which indicate specified class or type id is registered or not.
    #
    # @param klass_or_type [Class or Fixnum] Class or type id (0-127) to be checked
    # @param selector [Symbol] specify to check for :packer, :unpacker or :both (default)
    # @return true or false
    #
    def type_registered?(klass_or_type, selector=:both)
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/msgpack-1.1.0/doclib/msgpack/factory.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/msgpack-1.1.0/doclib/msgpack/factory.rb
msgpack-1.1.0-x64-mingw32 doclib/msgpack/factory.rb
msgpack-1.1.0-x86-mingw32 doclib/msgpack/factory.rb
msgpack-1.1.0 doclib/msgpack/factory.rb
msgpack-1.0.3-x86-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.3-x64-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.3 doclib/msgpack/factory.rb
msgpack-1.0.2-x64-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.2-x86-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.2 doclib/msgpack/factory.rb
msgpack-1.0.1-x64-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.1-x86-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.1 doclib/msgpack/factory.rb
msgpack-1.0.0-x64-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.0-x86-mingw32 doclib/msgpack/factory.rb
msgpack-1.0.0 doclib/msgpack/factory.rb
msgpack-0.7.6-x64-mingw32 doclib/msgpack/factory.rb
msgpack-0.7.6-x86-mingw32 doclib/msgpack/factory.rb
msgpack-0.7.6 doclib/msgpack/factory.rb