Class: Mengpaneel::Strategy::CapableClientSide
- Defined in:
- lib/mengpaneel/strategy/capable_client_side.rb
Constant Summary collapse
- REQUEST_HEADER =
"X-Mengpaneel-Flush-Capable".freeze
- RESPONSE_HEADER =
"X-Mengpaneel-Calls".freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Mengpaneel::Strategy::Base
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mengpaneel/strategy/capable_client_side.rb', line 11 def run return false unless controller return false unless capable? return true if all_calls[:tracking].blank? response.headers[RESPONSE_HEADER] = JSON.dump(all_calls[:tracking]) true end |