Class: Webrat::RackAdapter

Inherits:
Object show all
Extended by:
Forwardable
Defined in:
lib/webrat/adapters/rack.rb

Direct Known Subclasses

MerbAdapter, SinatraAdapter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session) ⇒ RackAdapter

:nodoc:



10
11
12
# File 'lib/webrat/adapters/rack.rb', line 10

def initialize(session) #:nodoc:
  @session = session
end

Instance Attribute Details

#sessionObject (readonly)

Returns the value of attribute session.



7
8
9
# File 'lib/webrat/adapters/rack.rb', line 7

def session
  @session
end

Instance Method Details

#responseObject



26
27
28
# File 'lib/webrat/adapters/rack.rb', line 26

def response
  @session.last_response
end

#response_bodyObject



14
15
16
# File 'lib/webrat/adapters/rack.rb', line 14

def response_body
  response.body
end

#response_codeObject



18
19
20
# File 'lib/webrat/adapters/rack.rb', line 18

def response_code
  response.status
end

#response_headersObject



22
23
24
# File 'lib/webrat/adapters/rack.rb', line 22

def response_headers
  response.headers
end