Class: QueryStringFilter
- Inherits:
-
Object
- Object
- QueryStringFilter
- Defined in:
- lib/query_string_filter.rb
Defined Under Namespace
Classes: ParseError
Instance Method Summary collapse
-
#initialize ⇒ QueryStringFilter
constructor
A new instance of QueryStringFilter.
- #parse(string) ⇒ Object
Constructor Details
#initialize ⇒ QueryStringFilter
Returns a new instance of QueryStringFilter.
9 10 11 |
# File 'lib/query_string_filter.rb', line 9 def initialize @parser = FilterParser.new end |
Instance Method Details
#parse(string) ⇒ Object
13 14 15 16 17 |
# File 'lib/query_string_filter.rb', line 13 def parse(string) parsed = @parser.parse(string) raise ParseError, "unable to parse: #{string}" unless parsed parsed.eval end |