Sha256: c3e3a29a1762589c516d3f209e62371d945290dc4858e366788be2abb53bc8d3

Contents?: true

Size: 362 Bytes

Versions: 6

Compression:

Stored size: 362 Bytes

Contents

require 'rubygems'
require 'treetop'
Treetop.load(File.dirname(__FILE__) + '/filter')

class QueryStringFilter
  
  class ParseError < RuntimeError; end
  
  def initialize
    @parser = FilterParser.new
  end
  
  def parse(string)
    parsed = @parser.parse(string)
    raise ParseError, "unable to parse: #{string}" unless parsed
    parsed.eval
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
query_string_filter-0.1.6 lib/query_string_filter.rb
query_string_filter-0.1.5 lib/query_string_filter.rb
query_string_filter-0.1.4 lib/query_string_filter.rb
query_string_filter-0.1.3 lib/query_string_filter.rb
query_string_filter-0.1.2 lib/query_string_filter.rb
query_string_filter-0.1.1 lib/query_string_filter.rb