Class: Elasticband::Aggregation::Filter

Inherits:
Elasticband::Aggregation show all
Defined in:
lib/elasticband/aggregation/filter.rb

Constant Summary

Constants inherited from Elasticband::Aggregation

PARSE_AGGREGATIONS

Instance Attribute Summary collapse

Attributes inherited from Elasticband::Aggregation

#name

Instance Method Summary collapse

Methods inherited from Elasticband::Aggregation

merge, parse

Constructor Details

#initialize(name, filter, options = {}) ⇒ Filter

Returns a new instance of Filter.



6
7
8
9
10
# File 'lib/elasticband/aggregation/filter.rb', line 6

def initialize(name, filter, options = {})
  super(name)
  self.filter = filter
  self.options = options
end

Instance Attribute Details

#filterObject

Returns the value of attribute filter.



4
5
6
# File 'lib/elasticband/aggregation/filter.rb', line 4

def filter
  @filter
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/elasticband/aggregation/filter.rb', line 4

def options
  @options
end

Instance Method Details

#to_hObject



12
13
14
# File 'lib/elasticband/aggregation/filter.rb', line 12

def to_h
  super(aggregation_hash)
end