Sha256: 0c9e22e79fbb544a3bdae1ca38db81bbbde3d665f3fd4f7e5619f2805db1e09e

Contents?: true

Size: 509 Bytes

Versions: 7

Compression:

Stored size: 509 Bytes

Contents

# typed: false
# frozen_string_literal: true

require 'active_support/hash_with_indifferent_access'

module Workato
  module Extension
    module HashWithIndifferentAccess
      refine ::ActiveSupport::HashWithIndifferentAccess.singleton_class do
        def wrap(value)
          return ::ActiveSupport::HashWithIndifferentAccess.new unless value
          return value if value.is_a?(ActiveSupport::HashWithIndifferentAccess)

          value.with_indifferent_access
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
workato-connector-sdk-1.3.5 lib/workato/extension/hash_with_indifferent_access.rb
workato-connector-sdk-1.3.4 lib/workato/extension/hash_with_indifferent_access.rb
workato-connector-sdk-1.3.3 lib/workato/extension/hash_with_indifferent_access.rb
workato-connector-sdk-1.3.2 lib/workato/extension/hash_with_indifferent_access.rb
workato-connector-sdk-1.3.1 lib/workato/extension/hash_with_indifferent_access.rb
workato-connector-sdk-1.3.0 lib/workato/extension/hash_with_indifferent_access.rb
workato-connector-sdk-1.2.0 lib/workato/extension/hash_with_indifferent_access.rb