Class: Rack::Client

Inherits:
Builder
  • Object
show all
Extended by:
Forwardable
Includes:
Test::Methods
Defined in:
lib/rack/client.rb

Defined Under Namespace

Modules: Auth Classes: FollowRedirects, HTTP

Constant Summary collapse

VERSION =
"0.2.4"
HTTP_METHODS =
[:head, :get, :put, :post, :delete]

Instance Method Summary collapse

Instance Method Details

#run(*args, &block) ⇒ Object



17
18
19
20
# File 'lib/rack/client.rb', line 17

def run(*args, &block)
  @ran = true
  super(*args, &block)
end

#to_app(*args, &block) ⇒ Object Also known as: app



22
23
24
25
# File 'lib/rack/client.rb', line 22

def to_app(*args, &block)
  run Rack::Client::HTTP unless @ran
  super(*args, &block)
end