Class: Rack::Pony

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

Constant Summary collapse

PONY =
<<-PONY
       .,,.
     ,;;*;;;;,
    .-'``;-');;.
   /'  .-.  /*;;
 .'    \d    \;;               .;;;,
/ o      `    \;    ,__.     ,;*;;;*;,
\__, _.__,'   \_.-') __)--.;;;;;*;;;;,
 `""`;;;\       /-')_) __)  `\' ';;;;;;
    ;*;;;        -') `)_)  |\ |  ;;;;*;
    ;;;;|        `---`    O | | ;;*;;;
    *;*;\|                 O  / ;;;;;*
   ;;;;;/|    .-------\      / ;*;;;;;
  ;;;*;/ \    |        '.   (`. ;;;*;;;
  ;;;;;'. ;   |          )   \ | ;;;;;;
  ,;*;;;;\/   |.        /   /` | ';;;*;
   ;;;;;;/    |/       /   /__/   ';;;
   '*jgs/     |       /    |      ;*;
        `""""`        `""""`     ;'
PONY

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Pony

Returns a new instance of Pony.



25
26
27
# File 'lib/rack/pony.rb', line 25

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



29
30
31
32
33
# File 'lib/rack/pony.rb', line 29

def call(env)
  status, headers, body = @app.call(env)
  headers['X-Pony-For-You'] = PONY
  [status, headers, body]
end