Class: RESO::API::QueryConditions

Inherits:
Object
  • Object
show all
Defined in:
lib/reso_api/app/models/reso/api/query_conditions.rb

Class Method Summary collapse

Class Method Details

.parse(args, negate: false) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/reso_api/app/models/reso/api/query_conditions.rb', line 5

def parse(args, negate: false)
  case args
  when Hash
    from_hash(args, negate: negate)
  when Array
    from_array(args, negate: negate)
  else
    raise ArgumentError, "Unsupported where argument type: #{args.class}"
  end
end