def build_paths
      case @paths
      when String
        @paths = Path::Single.new(path: @paths)
      when Array
        tmp_paths = []
        @paths.each do |path|
          if path.is_a? Hash
            tmp_paths << Path::Single.new(path)
          elsif path.is_a? String
            tmp_paths << Path::Single.new(path: path)
          else
            raise 'Unknown path structure'
          end
        end
        @paths = Path::Sequence.new(tmp_paths)
      when Hash
        @paths = Path::Single.new(@paths)
      when Path::Single, Path::Sequence, Path::Weighted
      else
        raise 'Unknown path structure'
      end
    end
def build_paths
      case @paths
      when String
        @paths = Path::Single.new(path: @paths)
      when Array
        tmp_paths = []
        @paths.each do |path|
          if path.is_a? Hash
            tmp_paths << Path::Single.new(path)
          elsif path.is_a? String
            tmp_paths << Path::Single.new(path: path)
          else
            raise 'Unknown path structure'
          end
        end
        @paths = Path::Sequence.new(tmp_paths)
      when Hash
        @paths = Path::Single.new(@paths)
      when Path::Single, Path::Sequence, Path::Weighted
      else
        raise 'Unknown path structure'
      end
    end
alias_method :path, :paths