Sha256: 18109a8d7129be7323c36de500aed30f8394684ff39a6a473682e3f1694339b1
Contents?: true
Size: 407 Bytes
Versions: 2
Compression:
Stored size: 407 Bytes
Contents
module GaEvents Event = Struct.new(:category, :action, :label, :value) do # Default values are set here, see README.md for details. def initialize(category = '-', action = '-', label = '-', value = 1) super GaEvents::List << self end def to_s [category, action, label, value].join('|') end def self.from_string(str) new(*str.split('|')) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ga_events-1.4.1 | lib/ga_events/event.rb |
ga_events-1.4.0 | lib/ga_events/event.rb |