lib/roda/plugins/typecast_params.rb
def present?(key)
          case key
          when String
            !any(key).nil?
          when Array
            key.all? do |k|
              raise ProgrammerError, "non-String element in array argument passed to present?: #{k.inspect}" unless k.is_a?(String)
              !any(k).nil?
            end
          else
            raise ProgrammerError, "unexpected argument passed to present?: #{key.inspect}"
          end
        end
# If key is a String Return whether the key is present in the object,
If key is a String Return whether the key is present in the object.
If key is a String Return whether the key is present in the object .
def present?(key)
          case key
          when String
            !any(key).nil?
          when Array
            key.all? do |k|
              raise ProgrammerError, "non-String element in array argument passed to present?: #{k.inspect}" unless k.is_a?(String)
              !any(k).nil?
            end
          else
            raise ProgrammerError, "unexpected argument passed to present?: #{key.inspect}"
          end
        end
def present? ( key ) case key when String ! any ( key ) . nil? when Array key . all? do | k | raise ProgrammerError , "non-String element in array argument passed to present?: #{k.inspect}" unless k . is_a? ( String ) ! any ( k ) . nil? end else raise ProgrammerError , "unexpected argument passed to present?: #{key.inspect}" end end
If key is a String Return whether the key is present in the object,
If key is a String Return whether the key is present in the object
key