Class: Rack::Transform::Transformer

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/transform/transformer.rb

Constant Summary collapse

REQUEST_NOOP =
Proc.new { |env| env }
RESPONSE_NOOP =
Proc.new { |status, header, body| [status, header, body] }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Transformer

Returns a new instance of Transformer.

Yields:

  • (_self)

Yield Parameters:



9
10
11
12
13
# File 'lib/rack/transform/transformer.rb', line 9

def initialize
  @request = REQUEST_NOOP
  @response = RESPONSE_NOOP
  yield self if block_given?
end

Instance Attribute Details

#requestObject

Returns the value of attribute request.



7
8
9
# File 'lib/rack/transform/transformer.rb', line 7

def request
  @request
end

#responseObject

Returns the value of attribute response.



7
8
9
# File 'lib/rack/transform/transformer.rb', line 7

def response
  @response
end