Module: Ethon::Easies::Operations

Included in:
Ethon::Easy
Defined in:
lib/ethon/easies/operations.rb

Overview

This module contains the logic to prepare and perform an easy.

Instance Method Summary collapse

Instance Method Details

#performInteger

Perform the easy request.

Examples:

Perform the request.

easy.perform

Returns:

  • (Integer)

    The return code.



13
14
15
16
17
# File 'lib/ethon/easies/operations.rb', line 13

def perform
  @return_code = Curl.easy_perform(handle)
  complete
  @return_code
end

#prepareObject

Prepare the easy. Options, headers and callbacks were set.

Examples:

Prepare easy.

easy.prepare


24
25
26
27
28
# File 'lib/ethon/easies/operations.rb', line 24

def prepare
  set_options
  set_headers
  set_callbacks
end