Class: Arelastic::Filters::Filter

Inherits:
Nodes::Node show all
Defined in:
lib/arelastic/filters/filter.rb

Instance Method Summary collapse

Methods inherited from Nodes::Node

#==, #convert_to_elastic

Methods included from Arities::Binary

#binary

Methods included from Arities::Polyadic

#polyadic

Methods included from Arities::Unary

#unary

Instance Method Details

#and(other) ⇒ Object



8
9
10
# File 'lib/arelastic/filters/filter.rb', line 8

def and other
  Arelastic::Filters::And.new [self, other]
end

#negateObject



12
13
14
# File 'lib/arelastic/filters/filter.rb', line 12

def negate
  Arelastic::Filters::Not.new self
end

#nested(path) ⇒ Object



16
17
18
# File 'lib/arelastic/filters/filter.rb', line 16

def nested path
  Arelastic::Filters::Nested.new path, self
end

#or(other) ⇒ Object



4
5
6
# File 'lib/arelastic/filters/filter.rb', line 4

def or other
  Arelastic::Filters::Or.new [self, other]
end