Sha256: 9aa268f678dc2613bd2043efe3400cfce9b19e21a8c3816feb9a7ff98e4df1e8

Contents?: true

Size: 572 Bytes

Versions: 18

Compression:

Stored size: 572 Bytes

Contents

# This class has dubious semantics and we only have it so that people can write
# params[:key] instead of params['key'].
class Mash < HashWithIndifferentAccess
  def initialize *args, &block
    ActiveSupport::Deprecation.warn("Mash is deprecated, and should be replaced with HashWithIndifferentAccess")

    super
  end
end

unless Hash.respond_to?(:to_mash)
  class Hash
    def to_mash
      ActiveSupport::Deprecation.warn("Hash#to_mash is deprecated, and should be replaced with #with_indifferent_access")

      HashWithIndifferentAccess.new(self)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-4.9.0 lib/blacklight/mash.rb
blacklight-4.8.0 lib/blacklight/mash.rb
blacklight-4.7.0 lib/blacklight/mash.rb
blacklight-4.7.0.pre1 lib/blacklight/mash.rb
blacklight-4.6.3 lib/blacklight/mash.rb
blacklight-4.6.2 lib/blacklight/mash.rb
blacklight-4.6.1 lib/blacklight/mash.rb
blacklight-4.6.0 lib/blacklight/mash.rb
blacklight-4.5.0 lib/blacklight/mash.rb
blacklight-4.5.0.rc1 lib/blacklight/mash.rb
blacklight-4.4.2 lib/blacklight/mash.rb
blacklight-4.4.1 lib/blacklight/mash.rb
blacklight-4.4.0 lib/blacklight/mash.rb
blacklight-4.3.0 lib/blacklight/mash.rb
blacklight-4.2.2 lib/blacklight/mash.rb
blacklight-4.2.1 lib/blacklight/mash.rb
blacklight-4.2.0 lib/blacklight/mash.rb
blacklight-4.1.0 lib/blacklight/mash.rb