vendor/bundle/ruby/2.7.0/gems/typhoeus-1.4.0/lib/rack/typhoeus/middleware/params_decoder/helper.rb
# Checks if Hash is an Array encoded as a Hash.
# Specifically will check for the Hash to have this
# form: {'0' => v0, '1' => v1, .., 'n' => vN }
#
# @param hash [Hash]
#
# @return [Boolean] True if its a encoded Array, else false.
Checks if Hash is an Array encoded as a Hash.
Checks if Hash is an Array encoded as a Hash .
def encoded?(hash)
            return false if hash.empty?
	          if hash.keys.size > 1
              keys = hash.keys.map{|i| i.to_i if i.respond_to?(:to_i)}.sort
              keys == hash.keys.size.times.to_a
	          else
              hash.keys.first =~ /0/
	          end
          end
def encoded? ( hash ) return false if hash . empty? if hash . keys . size > 1 keys = hash . keys . map { | i | i . to_i if i . respond_to? ( :to_i ) } . sort keys == hash . keys . size . times . to_a else hash . keys . first =~ / 0 / end end
Checks if Hash is an Array encoded as a Hash.
Checks if Hash is an Array encoded as a Hash .
True if its a encoded Array, else false.
True if its a encoded Array else false .
Boolean
hash
<not_specific>
<not_specific>
None