Module: Excon

Defined in:
lib/excon.rb,
lib/excon/errors.rb,
lib/excon/response.rb,
lib/excon/connection.rb,
lib/excon/connection.rb

Defined Under Namespace

Modules: Errors Classes: Connection, Response

Constant Summary collapse

CHUNK_SIZE =

1 megabyte

1048576

Class Method Summary collapse

Class Method Details

.mock!Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/excon.rb', line 22

def self.mock!
  @mocking = true
  @mocks = {}

  def self.mocks
    @mocks
  end

  self.reload
end

.mocking?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/excon.rb', line 33

def self.mocking?
  !!@mocking
end

.mocksObject



26
27
28
# File 'lib/excon.rb', line 26

def self.mocks
  @mocks
end

.new(url) ⇒ Object



37
38
39
# File 'lib/excon.rb', line 37

def self.new(url)
  Excon::Connection.new(url)
end

.reloadObject



18
19
20
# File 'lib/excon.rb', line 18

def self.reload
  load 'excon/connection.rb'
end