Sha256: d678d327ab4d7e283261d7fbc4117192520d3b437228ba4db18e773671676c69
Contents?: true
Size: 706 Bytes
Versions: 15
Compression:
Stored size: 706 Bytes
Contents
module Locomotive module Wagon module Liquid module Tags class GoogleAnalytics < ::Liquid::Tag Syntax = /(#{::Liquid::Expression}+)?/ def initialize(tag_name, markup, tokens, options) if markup =~ Syntax @account_id = $1.gsub('\'', '') else raise ::Liquid::SyntaxError.new(options[:locale].t("errors.syntax.google_analytics"), options[:line]) end super end def render(context) "<!-- google analytics for #{@account_id} -->" end end ::Liquid::Template.register_tag('google_analytics', GoogleAnalytics) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems