module Ethon::Easies::Http

def fabricate(action_name)

Returns:
  • (Class) - The action class.

Parameters:
  • action_name (String) -- The action name.

Other tags:
    Example: Return the action. -
def fabricate(action_name)
  eval("#{action_name.to_s.capitalize}")
end

def http_request(url, action_name, options = {})

Parameters:
  • options (Hash) -- The options hash.
  • action_name (String) -- The http action name.
  • url (String) -- The url.

Other tags:
    Example: Set options for http request. -
def http_request(url, action_name, options = {})
  fabricate(action_name).new(url, options).setup(self)
end