Module: Roby::Log::TaskDisplaySupport

Included in:
ChronicleDisplay, RelationsDisplay
Defined in:
lib/roby/log/relations.rb

Instance Method Summary collapse

Instance Method Details

#filter_prefixes(string) ⇒ Object



402
403
404
405
406
407
408
# File 'lib/roby/log/relations.rb', line 402

def filter_prefixes(string)
		# @prefixes_removal is computed in RelationsDisplay#update
		for prefix in @prefixes_removal
 string = string.gsub(prefix, '')
		end
		string
end

#update_prefixes_removalObject

Compute the prefixes to remove from in filter_prefixes: enable only the ones that are flagged, and sort them by prefix length



395
396
397
398
399
400
# File 'lib/roby/log/relations.rb', line 395

def update_prefixes_removal
		@prefixes_removal = removed_prefixes.find_all { |p, b| b }.
 map { |p, b| p }.
 sort_by { |p| p.length }.
 reverse
end