Class: QueryStringInterface::Parsers::ArrayParser
- Inherits:
-
Object
- Object
- QueryStringInterface::Parsers::ArrayParser
- Defined in:
- lib/query_string_interface/parsers/array_parser.rb
Constant Summary collapse
- ARRAY_SEPARATOR =
'|'
Instance Method Summary collapse
Instance Method Details
#parse(value) ⇒ Object
10 11 12 13 14 |
# File 'lib/query_string_interface/parsers/array_parser.rb', line 10 def parse(value) value.split(ARRAY_SEPARATOR).map(&:strip).map do |item| parse_item(item) end end |
#parseable?(value, operator) ⇒ Boolean
6 7 8 |
# File 'lib/query_string_interface/parsers/array_parser.rb', line 6 def parseable?(value, operator) operator && conditional_operators.include?(operator) end |