Method: Uuml::Middleware#call

Defined in:
lib/uuml/middleware.rb

#call(env) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/uuml/middleware.rb', line 11

def call(env)
  status, headers, response = @app.call(env)
  
  if headers['Content-Type'] == 'text/html; charset=utf-8'
    response.body = Uuml::HTML.convert(response.body)
  end
  [status, headers, response]
end