Sha256: f6e780730ec925cdb73c1f24be92e500d07534c6b2787fd963655fe788a2f59d

Contents?: true

Size: 311 Bytes

Versions: 1

Compression:

Stored size: 311 Bytes

Contents

module OldApiResource
  module Associations 
    # RelatedObjectHash, re-defines dup to be recursive
    class RelatedObjectHash < HashWithIndifferentAccess
      def dup
        Marshal.load(Marshal.dump(self))
      end
      # use this behavior for clone too
      alias_method :clone, :dup
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
old_api_resource-0.3.0 lib/old_api_resource/associations/related_object_hash.rb