# File lib/innate/helper/link.rb, line 26 def route(name = '/', *args) hash = {} hashes, names = args.partition{|arg| arg.respond_to?(:merge!) } hashes.each{|to_merge| hash.merge!(to_merge) } name = name.to_s.gsub(/__/, '/') location = route_location(self) front = Array[location, name, *names.map{|element| Rack::Utils.escape(element) }].join('/').squeeze('/') return URI(front) if hash.empty? query = Rack::Utils.build_query(hash) URI("#{front}?#{query}") end