class Ethon::Easies::Params
This class represents http request parameters.
def empty?
-
(Boolean)
- True if params is empty, else false.
Other tags:
- Example: Return if params is empty. -
def empty? @params.empty? end
def initialize(params)
-
(Params)
- A new Params.
Parameters:
-
params
(Hash
) -- The params to use.
Other tags:
- Example: Create a new Params. -
def initialize(params) @params = params || {} end
def query_pairs
-
(Array)
- The query pairs.
Other tags:
- Example: Return the query pairs. -
def query_pairs @query_pairs ||= build_query_pairs(@params) end
def to_s
-
(String)
- The string representation.
Other tags:
- Example: Return string representation. -
def to_s query_pairs.map{|pair| pair.map{|e| escape ? CGI::escape(e.to_s) : e }.join("=")}.join('&') end