Class: Rack::Uppercase

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

Constant Summary collapse

VERSION =
"1.0.0"

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Uppercase

Returns a new instance of Uppercase.



6
7
8
# File 'lib/rack/uppercase.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/rack/uppercase.rb', line 10

def call(env)
  status, headers, response = @app.call(env)
  response.each{ |str| str.upcase! }
  [ status, headers, response ]
end