Sha256: 958123aed0f674825830f21875ff81f7b2bb36f767e3cd10c77b71bbc4ab7273

Contents?: true

Size: 375 Bytes

Versions: 10

Compression:

Stored size: 375 Bytes

Contents

module AbPanel
  class Javascript
    def self.environment
      props = { distinct_id: AbPanel.env["distinct_id"] }
      props.merge!(AbPanel.properties) if AbPanel.properties

      AbPanel.funnels.each { |f| props["funnel_#{f}"] = true }

      AbPanel.experiments.each { |exp| props[exp] = AbPanel.conditions.send(exp).condition }

      props.to_json
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ab_panel-0.4.3 lib/ab_panel/javascript.rb
ab_panel-0.4.2 lib/ab_panel/javascript.rb
ab_panel-0.4.1 lib/ab_panel/javascript.rb
ab_panel-0.4.0 lib/ab_panel/javascript.rb
ab_panel-0.3.3 lib/ab_panel/javascript.rb
ab_panel-0.3.2 lib/ab_panel/javascript.rb
ab_panel-0.3.1 lib/ab_panel/javascript.rb
ab_panel-0.3.0 lib/ab_panel/javascript.rb
ab_panel-0.2.0 lib/ab_panel/javascript.rb
ab_panel-0.1.3 lib/ab_panel/javascript.rb