Sha256: e7e5b73ca30adaf6e90b89d61f785bffe742854511ba12b0f13c9ea0be449cb3

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require 'darthjee/core_ext/hash/key_changeable'
require 'darthjee/core_ext/hash/transposeable'
require 'darthjee/core_ext/hash/transformable'

module Darthjee
  module CoreExt
    module Hash
      autoload :ChainFetcher,        "#{PATH}/hash/chain_fetcher"
      autoload :DeepHashConstructor, "#{PATH}/hash/deep_hash_constructor"
      autoload :KeyChanger,          "#{PATH}/hash/key_changer"
      autoload :KeysSorter,          "#{PATH}/hash/keys_sorter"
      autoload :Squasher,            "#{PATH}/hash/squasher"
      autoload :ValueChanger,        "#{PATH}/hash/value_changer"
      autoload :ToHashMapper,        "#{PATH}/hash/to_hash_mapper"

      include Hash::KeyChangeable
      include Hash::Transposeable
      include Hash::Transformable

      ########################################
      # Fetching methods
      #########################################

      def chain_fetch(*keys, &block)
        ::Hash::ChainFetcher.new(self, *keys, &block).fetch
      end
    end
  end
end

class Hash
  include Darthjee::CoreExt::Hash
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
darthjee-core_ext-1.7.3 lib/darthjee/core_ext/hash.rb
darthjee-core_ext-1.7.2 lib/darthjee/core_ext/hash.rb
darthjee-core_ext-1.7.1 lib/darthjee/core_ext/hash.rb
darthjee-core_ext-1.7.0 lib/darthjee/core_ext/hash.rb