Class: Elasticband::Filter::And

Inherits:
Elasticband::Filter show all
Defined in:
lib/elasticband/filter/and.rb

Constant Summary

Constants inherited from Elasticband::Filter

PARSE_FILTERS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Elasticband::Filter

parse, #parse

Constructor Details

#initialize(filters, options = {}) ⇒ And

Returns a new instance of And.



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

def initialize(filters, options = {})
  self.filters = Array.wrap(filters)
  self.options = options
end

Instance Attribute Details

#filtersObject

Returns the value of attribute filters.



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

def filters
  @filters
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#to_hObject



11
12
13
# File 'lib/elasticband/filter/and.rb', line 11

def to_h
  { and: filter_hash }
end