Sha256: 689c24e0b7065711ed11de32a81ef1fb01ff626abd9bc7b94f7a33a2837d90f4
Contents?: true
Size: 524 Bytes
Versions: 5
Compression:
Stored size: 524 Bytes
Contents
# This tool prepends the names of the trackers passing through it with a prefix # and an underscore class Tracksperanto::Tool::Prefix < Tracksperanto::Tool::Base parameter :prefix, :cast => :string, :desc => "The prefix to apply", :default => "trk_" def self.action_description "Prefix tracker names with text" end def start_tracker_segment(tracker_name) prefixed_name = [prefix.gsub(/_$/, ''), tracker_name] prefixed_name.reject!{|e| e.empty? } super(prefixed_name.join('_')) end end
Version data entries
5 entries across 5 versions & 1 rubygems