Class: Rack::Transform::Transformers::Base::Request

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

Constant Summary collapse

CONTENT_TYPE =
"CONTENT_TYPE".freeze
CONTENT_LENGTH =
"CONTENT_LENGTH".freeze
POST_BODY =
"rack.input".freeze
JSON_TYPE =
"application/json".freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Request

Returns a new instance of Request.



17
18
19
# File 'lib/rack/transform/transformers/base.rb', line 17

def initialize(env)
  @env = env
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



15
16
17
# File 'lib/rack/transform/transformers/base.rb', line 15

def env
  @env
end

Class Method Details

.call(env) ⇒ Object



11
12
13
# File 'lib/rack/transform/transformers/base.rb', line 11

def self.call(env)
  new(env).process
end

Instance Method Details

#processObject

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/rack/transform/transformers/base.rb', line 21

def process
  raise NotImplementedError
end