class MPulse

Constants

APIKEY_RE
MPULSE_LOADER

source: docs.soasta.com/boomerang/#mpulse-loader-snippet

Public Class Methods

new(config) click to toggle source
# File lib/analytics/MPulse.rb, line 52
def initialize(config)
    if !(APIKEY_RE.match(config["apikey"]))
        raise ArgumentError, 'Invalid mPulse API key. Id must look like XXXXX-XXXXX-XXXXX-XXXXX-XXXXX'
    end

    @apikey = config["apikey"]
end

Public Instance Methods

render() click to toggle source
# File lib/analytics/MPulse.rb, line 60
def render()
    return MPULSE_LOADER % @apikey
end