Module: Ecoportal::API::GraphQL::Input::SearchConf::Composable

Included in:
And, DateRange, Exact, Or, RawFilter, Register
Defined in:
lib/ecoportal/api/graphql/input/search_conf.rb

Overview


Composable — adds & and | operators to filter classes so they can be combined using natural Ruby operator syntax: filter1 & filter2 → SearchConf::And.new(filter1, filter2)

filter1 | filter2 → SearchConf::Or.new(filter1, filter2)

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



61
62
63
# File 'lib/ecoportal/api/graphql/input/search_conf.rb', line 61

def &(other)
  SearchConf::And.new(self, other)
end

#|(other) ⇒ Object



65
66
67
# File 'lib/ecoportal/api/graphql/input/search_conf.rb', line 65

def |(other)
  SearchConf::Or.new(self, other)
end