Module: Lamby::Debug
Instance Method Summary collapse
Instance Method Details
#call(event, context, env) ⇒ Object
10 11 12 |
# File 'lib/lamby/debug.rb', line 10 def call(event, context, env) [ 200, { 'Content-Type' => 'text/html' }, [body(event, context, env)] ] end |
#on?(event) ⇒ Boolean
5 6 7 8 |
# File 'lib/lamby/debug.rb', line 5 def on?(event) params = event['multiValueQueryStringParameters'] || event['queryStringParameters'] (development? || ENV['LAMBY_DEBUG']) && params && params['debug'] == '1' end |