# Module: SnakyHash::Serializer::Modulizer

Defined in:
  lib/snaky_hash/serializer.rb

## Overview

Internal module for generating extension methods

## Class Method Summary collapse

- .to_extended_mod ⇒ Module

  Creates a new module with extension management methods.

## Class Method Details

### .to_extended_mod ⇒ `Module`

Creates a new module with extension management methods

Returns:

- (`Module`) —

  a module containing extension management methods

    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    # File 'lib/snaky_hash/serializer.rb', line 58

    def to_extended_mod
      Module.new do
        define_method :load_value_extensions do
          @load_value_extensions ||= Extensions.new
        end

        define_method :load_extensions do
          load_value_extensions
        end

        define_method :dump_value_extensions do
          @dump_value_extensions ||= Extensions.new
        end

        define_method :dump_extensions do
          dump_value_extensions
        end

        define_method :load_hash_extensions do
          @load_hash_extensions ||= Extensions.new
        end

        define_method :dump_hash_extensions do
          @dump_hash_extensions ||= Extensions.new
        end
      end
    end