Class: Tracksperanto::Tool::Prefix
Overview
This tool prepends the names of the trackers passing through it with a prefix and an underscore
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Methods included from Parameters
Methods included from SimpleExport
Methods included from ConstName
Methods included from BlockInit
Methods included from Casts
#cast_to_bool, #cast_to_float, #cast_to_int, #cast_to_string
Constructor Details
This class inherits a constructor from Tracksperanto::Tool::Base
Class Method Details
.action_description ⇒ Object
7 8 9 |
# File 'lib/tools/prefix.rb', line 7 def self.action_description "Prefix tracker names with text" end |
Instance Method Details
#start_tracker_segment(tracker_name) ⇒ Object
11 12 13 14 15 |
# File 'lib/tools/prefix.rb', line 11 def start_tracker_segment(tracker_name) prefixed_name = [prefix.gsub(/_$/, ''), tracker_name] prefixed_name.reject!{|e| e.empty? } super(prefixed_name.join('_')) end |