Module: Restify

Defined in:
lib/restify.rb,
lib/restify/link.rb,
lib/restify/error.rb,
lib/restify/context.rb,
lib/restify/promise.rb,
lib/restify/request.rb,
lib/restify/version.rb,
lib/restify/relation.rb,
lib/restify/resource.rb,
lib/restify/response.rb,
lib/restify/adapter/em.rb,
lib/restify/processors/base.rb,
lib/restify/processors/json.rb,
lib/restify/adapter/typhoeus.rb

Defined Under Namespace

Modules: Adapter, Processors, VERSION Classes: ClientError, Context, Link, Promise, Relation, Request, Resource, Response, ResponseError, ServerError

Constant Summary collapse

PROCESSORS =
[Processors::Json]

Class Method Summary collapse

Class Method Details

.adapterObject



33
34
35
36
37
38
# File 'lib/restify.rb', line 33

def adapter
  @adapter ||= begin
    require 'restify/adapter/typhoeus'
    Restify::Adapter::Typhoeus.new
  end
end

.adapter=(adapter) ⇒ Object



40
41
42
# File 'lib/restify.rb', line 40

def adapter=(adapter)
  @adapter = adapter
end

.new(uri, opts = {}) ⇒ Object



29
30
31
# File 'lib/restify.rb', line 29

def new(uri, opts = {})
  Relation.new Context.new(uri, opts), uri
end