lib/roda/plugins/typecast_params.rb
def array(type, key, default=nil)
          meth = :"_convert_array_#{type}"
          raise ProgrammerError, "no typecast_params type registered for #{type.inspect}" unless respond_to?(meth, true)
          process_arg(meth, key, default) if require_hash!
        end
# Convert the value of +key+ to an array of values of the given +type+. If +default+ is
# given, any +nil+ values in the array are replaced with +default+.  If +key+ is an array
# then this returns an array of arrays, one for each respective value of +key+. If there is
# no value for +key+, nil is returned instead of an array.
Convert the value of +key+ to an array of values of the given +type+.
Convert the value of + key + to an array of values of the given + type + .
def array(type, key, default=nil)
          meth = :"_convert_array_#{type}"
          raise ProgrammerError, "no typecast_params type registered for #{type.inspect}" unless respond_to?(meth, true)
          process_arg(meth, key, default) if require_hash!
        end
def array ( type , key , default = nil ) meth = :" _convert_array_ #{ type } " raise ProgrammerError , "no typecast_params type registered for #{type.inspect}" unless respond_to? ( meth , true ) process_arg ( meth , key , default ) if require_hash! end
Convert the value of +key+ to an array of values of the given +type+.
Convert the value of + key + to an array of values of the given + type + .
type
key
default