Class: Rack::Recorder

Inherits:
Object show all
Defined in:
lib/kiss/rack/recorder.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Recorder

Returns a new instance of Recorder.



3
4
5
6
7
8
9
10
11
# File 'lib/kiss/rack/recorder.rb', line 3

def initialize(app)
  @_app = app
  
  @@filepath ||= begin
    puts "Yo.  Starting app..."
    puts "Would ask you for a test name or recording path here."
    'something'
  end
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/kiss/rack/recorder.rb', line 13

def call(env)
  code, headers, body = @_app.call(env)
  
  puts "OK, that was fun."
  puts "Would save some request and response data here."
  
  [ code, headers, body ]
end