Class: Rack::JSON::JSONQuery
- Inherits:
-
Object
- Object
- Rack::JSON::JSONQuery
- Defined in:
- lib/rackjson/json_query.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#selector ⇒ Object
Returns the value of attribute selector.
Instance Method Summary collapse
-
#initialize(query_string) ⇒ JSONQuery
constructor
A new instance of JSONQuery.
Constructor Details
#initialize(query_string) ⇒ JSONQuery
Returns a new instance of JSONQuery.
6 7 8 9 10 11 12 |
# File 'lib/rackjson/json_query.rb', line 6 def initialize(query_string) @query_string = query_string @conditions = @query_string.split(/\[|\]/).compact.reject {|s| s.empty? } @options = {} @selector = {} build end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/rackjson/json_query.rb', line 4 def @options end |
#selector ⇒ Object
Returns the value of attribute selector.
4 5 6 |
# File 'lib/rackjson/json_query.rb', line 4 def selector @selector end |