def expand_tube_name(tube)
      prefix = queue_config.tube_namespace
      separator = queue_config.namespace_separator
      queue_name = if tube.is_a?(String)
        tube
      elsif tube.respond_to?(:queue) # use queue name
        queue = tube.queue
        queue.is_a?(Proc) ? queue.call(tube) : queue
      elsif tube.is_a?(Proc)
        tube.call
      elsif tube.is_a?(Class) # no queue name, use default
        queue_config.primary_queue # tube.name
      else # turn into a string
        tube.to_s
      end
      [prefix.gsub(/\.$/, ''), dasherize(queue_name).gsub(/^#{prefix}/, '')].join(separator).gsub(/#{Regexp::escape(separator)}+/, separator).split(':').first
    end
Expands a tube to include the prefix

@example
expand_tube_name("foo_with_settings:3:100:6") # => <prefix>.foo_with_settings
expand_tube_name("foo") # => <prefix>.foo
expand_tube_name(FooJob) # => <prefix>.foo-job