lib/mobylette/resolvers/chained_fallback_resolver.rb
# Helper for building query glob string based on resolver's pattern.
Helper for building query glob string based on resolver's pattern.
Helper for building query glob string based on resolver ' s pattern .
def build_query(path, details)
        query = @pattern.dup
        prefix = path.prefix.empty? ? "" : "#{escape_entry(path.prefix)}\\1"
        query.gsub!(/\:prefix(\/)?/, prefix)
        partial = escape_entry(path.partial? ? "_#{path.name}" : path.name)
        query.gsub!(/\:action/, partial)
        details.each do |ext, variants|
          query.gsub!(/\:#{ext}/, "{#{variants.compact.uniq.join(',')}}")
        end
        query.gsub!(/\:path/, "#{@paths.compact.uniq.join(',')}")
      end
def build_query ( path , details ) query = @pattern . dup prefix = path . prefix . empty? ? "" : "#{escape_entry(path.prefix)}\\1" query . gsub! ( / \: prefix( \/ )? / , prefix ) partial = escape_entry ( path . partial? ? "_#{path.name}" : path . name ) query . gsub! ( / \: action / , partial ) details . each do | ext , variants | query . gsub! ( / \: #{ ext } / , "{#{variants.compact.uniq.join(',')}}" ) end query . gsub! ( / \: path / , "#{@paths.compact.uniq.join(',')}" ) end
Helper for building query glob string based on resolver's pattern.
Helper for building query glob string based on resolver ' s pattern .
path
details