Class: CouchClient::Hookup

Inherits:
Object
  • Object
show all
Defined in:
lib/couch-client/hookup.rb

Overview

Hookup is the basic HTTP interface that connects CouchClient to CouchDB. Hookup can use any HTTP library if the conventions listed below are followed.

If modified, Hookup must have head, get, post, put and delete instance methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler) ⇒ Hookup

Hookup is constructed with a connection handler, which formats the proper URIs with a domain, authentication, path and query string.



18
19
20
# File 'lib/couch-client/hookup.rb', line 18

def initialize(handler)
  @handler = handler
end

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler.



14
15
16
# File 'lib/couch-client/hookup.rb', line 14

def handler
  @handler
end

Instance Method Details

#inspectObject



58
59
60
# File 'lib/couch-client/hookup.rb', line 58

def inspect
  "#<#{self.class}>"
end