class Object
Public Instance Methods
common_path(paths)
click to toggle source
# File lib/utils/utils.rb, line 59 def common_path(paths) common = '' paths.each do |file| path_components = file.to_s if common.empty? common = path_components else common = common.path_intersection path_components end end if File.file? common common = common.delete_last_path_component end if common[-1] == '/' common = common[0..-2] end common end
gena_system(*args)
click to toggle source
# File lib/utils/utils.rb, line 3 def gena_system(*args) if $verbose system *args else system *args, :out => ['/dev/null', 'a'], :err => ['/dev/null', 'a'] end end