Module Ethon::Easy::Queryable
In: lib/ethon/easy/queryable.rb

This module contains logic about building query parameters for url or form.

Methods

Public Class methods

Public Instance methods

Return query pairs build from a hash.

@example Build query pairs.

  action.build_query_pairs({a: 1, b: 2})
  #=> [[:a, 1], [:b, 2]]

@param [ Hash ] hash The hash to go through.

@return [ Array ] The array of query pairs.

Return wether there are elements in params or not.

@example Return if params is empty.

  form.empty?

@return [ Boolean ] True if params is empty, else false.

Return file info for a file.

@example Return file info.

  action.file_info(File.open('fubar', 'r'))

@param [ File ] file The file to handle.

@return [ Array ] Array of informations.

Return the query pairs.

@example Return the query pairs.

  params.query_pairs

@return [ Array ] The query pairs.

Return the string representation of params.

@example Return string representation.

  params.to_s

@return [ String ] The string representation.

[Validate]