Class: Xing::Services::LogJsonResponses
- Inherits:
-
LogJson
- Object
- LogJson
- Xing::Services::LogJsonResponses
show all
- Defined in:
- lib/xing/services/log_json_responses.rb
Constant Summary
Constants inherited
from LogJson
Xing::Services::LogJson::APPJSON_RE
Instance Method Summary
collapse
Methods inherited from LogJson
#log_string
Constructor Details
31
32
33
|
# File 'lib/xing/services/log_json_responses.rb', line 31
def initialize(app)
@app = app
end
|
Instance Method Details
#call(env) ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/xing/services/log_json_responses.rb', line 35
def call(env)
@app.call(env).tap do |status, , response|
if defined?(Rails) and ["Content-Type"] =~ APPJSON_RE
log_string(response.body)
end
end
end
|
#type_string ⇒ Object
43
44
45
|
# File 'lib/xing/services/log_json_responses.rb', line 43
def type_string
"Response"
end
|