Class: Rack::Transform::Transformer
- Inherits:
-
Object
- Object
- Rack::Transform::Transformer
- 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
-
#request ⇒ Object
Returns the value of attribute request.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Transformer
constructor
A new instance of Transformer.
Constructor Details
#initialize {|_self| ... } ⇒ Transformer
Returns a new instance of Transformer.
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
#request ⇒ Object
Returns the value of attribute request.
7 8 9 |
# File 'lib/rack/transform/transformer.rb', line 7 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/rack/transform/transformer.rb', line 7 def response @response end |