module Ethon::Easies::Http::Actionable

def form

Returns:
  • (Form) - The form.

Other tags:
    Example: Return form. -
def form
  @form ||= Form.new(options[:body])
end

def initialize(url, options)

Returns:
  • (Action) - A new action.

Parameters:
  • options (Hash) -- The options.
  • url (String) -- The url.

Other tags:
    Example: Create a new action. -
def initialize(url, options)
  @url = url
  @options = options
end

def options

Returns:
  • (Hash) - The options.

Other tags:
    Example: Return options. -
def options
  @options
end

def params

Returns:
  • (Params) - The params.

Other tags:
    Example: Return params. -
def params
  @params ||= Params.new(options[:params])
end

def set_form(easy)

Parameters:
  • easy (Easy) -- The easy to setup.

Other tags:
    Example: Setup nothing. -
def set_form(easy)
end

def set_nothing(easy)

Parameters:
  • easy (Easy) -- The easy to setup.

Other tags:
    Example: Setup nothing. -
def set_nothing(easy)
  easy.url = url
end

def set_params(easy)

Parameters:
  • easy (Easy) -- The easy to setup.

Other tags:
    Example: Setup nothing. -
def set_params(easy)
  params.escape = true
  easy.url = "#{url}?#{params.to_s}"
end

def setup(easy)

Parameters:
  • easy (easy) -- the easy to setup.

Other tags:
    Example: setup. -
def setup(easy)
  set_nothing(easy) if params.empty? && form.empty?
  set_params(easy) unless params.empty?
  set_form(easy) unless form.empty?
  easy.set_attributes(options)
end

def url

Returns:
  • (String) - The url.

Other tags:
    Example: Return url. -
def url
  @url
end