Class: Druid::Filter
- Inherits:
-
Object
- Object
- Druid::Filter
- Includes:
- ActiveModel::Model
- Defined in:
- lib/druid/filter.rb
Direct Known Subclasses
BooleanFilter, BoundFilter, CircFilter, DimensionFilter, JavascriptFilter, RecFilter, SearchFilter
Defined Under Namespace
Classes: DimensionValidator, FieldValidator, FieldsValidator, FunctionValidator, PatternValidator, ValueValidator
Instance Attribute Summary collapse
-
#dimension ⇒ Object
Returns the value of attribute dimension.
-
#field ⇒ Object
Returns the value of attribute field.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#function ⇒ Object
Returns the value of attribute function.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
130 131 132 |
# File 'lib/druid/filter.rb', line 130 def method_missing(name, *args) DimensionFilter.new(dimension: name) end |
Instance Attribute Details
#dimension ⇒ Object
Returns the value of attribute dimension.
19 20 21 |
# File 'lib/druid/filter.rb', line 19 def dimension @dimension end |
#field ⇒ Object
Returns the value of attribute field.
101 102 103 |
# File 'lib/druid/filter.rb', line 101 def field @field end |
#fields ⇒ Object
Returns the value of attribute fields.
66 67 68 |
# File 'lib/druid/filter.rb', line 66 def fields @fields end |
#function ⇒ Object
Returns the value of attribute function.
123 124 125 |
# File 'lib/druid/filter.rb', line 123 def function @function end |
#pattern ⇒ Object
Returns the value of attribute pattern.
47 48 49 |
# File 'lib/druid/filter.rb', line 47 def pattern @pattern end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/druid/filter.rb', line 5 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
33 34 35 |
# File 'lib/druid/filter.rb', line 33 def value @value end |
Instance Method Details
#as_json(options = {}) ⇒ Object
126 127 128 |
# File 'lib/druid/filter.rb', line 126 def as_json( = {}) super(.merge(except: %w(errors validation_context))) end |