Sha256: b7712814962444cff00c623eb934cd941d62e62d1b346292a17921af03ba8a8a

Contents?: true

Size: 332 Bytes

Versions: 2

Compression:

Stored size: 332 Bytes

Contents

# frozen_string_literal: true

require "active_support"
require "active_support/core_ext/hash"

module FeCoreExt::CoreExt
end

module FeCoreExt::CoreExt::Hash
  def rename_key(original_key, new_key)
    self[new_key] = delete(original_key) if key?(original_key)
    self
  end
end

class Hash
  include FeCoreExt::CoreExt::Hash
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fe_core_ext-0.30.0 lib/fe_core_ext/core_ext/hash.rb
fe_core_ext-0.29.1 lib/fe_core_ext/core_ext/hash.rb