Class: Mengpaneel::Strategy::ServerSide

Inherits:
Base
  • Object
show all
Defined in:
lib/mengpaneel/strategy/server_side.rb

Instance Attribute Summary

Attributes inherited from Base

#all_calls, #controller

Instance Method Summary collapse

Constructor Details

#initialize(all_calls, controller = nil, remote_ip = nil) ⇒ ServerSide


7
8
9
10
11
# File 'lib/mengpaneel/strategy/server_side.rb', line 7

def initialize(all_calls, controller = nil, remote_ip = nil)
  super(all_calls, controller)

  @remote_ip = remote_ip || controller.try(:request).try(:remote_ip)
end

Instance Method Details

#runObject


13
14
15
16
17
18
19
20
21
# File 'lib/mengpaneel/strategy/server_side.rb', line 13

def run
  return true if all_calls[:tracking].blank?

  perform_calls(:before_setup)
  perform_calls(:setup)
  perform_calls(:tracking)

  true
end