Class: Rokaki::FilterModel::NestedFilter
- Inherits:
-
Object
- Object
- Rokaki::FilterModel::NestedFilter
- Defined in:
- lib/rokaki/filter_model/nested_filter.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
readonly
Returns the value of attribute db.
-
#filter_key_object ⇒ Object
readonly
Returns the value of attribute filter_key_object.
-
#filter_methods ⇒ Object
Returns the value of attribute filter_methods.
-
#filter_templates ⇒ Object
Returns the value of attribute filter_templates.
-
#i_like_semantics ⇒ Object
readonly
Returns the value of attribute i_like_semantics.
-
#infix ⇒ Object
readonly
Returns the value of attribute infix.
-
#like_semantics ⇒ Object
readonly
Returns the value of attribute like_semantics.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#call ⇒ Object
_chain_nested_filter.
-
#initialize(filter_key_object:, prefix:, infix:, like_semantics:, i_like_semantics:, db:, mode: :and) ⇒ NestedFilter
constructor
A new instance of NestedFilter.
Constructor Details
#initialize(filter_key_object:, prefix:, infix:, like_semantics:, i_like_semantics:, db:, mode: :and) ⇒ NestedFilter
Returns a new instance of NestedFilter.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 7 def initialize(filter_key_object:, prefix:, infix:, like_semantics:, i_like_semantics:, db:, mode: :and) @filter_key_object = filter_key_object @prefix = prefix @infix = infix @like_semantics = like_semantics @i_like_semantics = i_like_semantics @filter_methods = [] @filter_templates = [] @db = db @mode = mode end |
Instance Attribute Details
#db ⇒ Object (readonly)
Returns the value of attribute db.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def db @db end |
#filter_key_object ⇒ Object (readonly)
Returns the value of attribute filter_key_object.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def filter_key_object @filter_key_object end |
#filter_methods ⇒ Object
Returns the value of attribute filter_methods.
19 20 21 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 19 def filter_methods @filter_methods end |
#filter_templates ⇒ Object
Returns the value of attribute filter_templates.
19 20 21 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 19 def filter_templates @filter_templates end |
#i_like_semantics ⇒ Object (readonly)
Returns the value of attribute i_like_semantics.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def i_like_semantics @i_like_semantics end |
#infix ⇒ Object (readonly)
Returns the value of attribute infix.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def infix @infix end |
#like_semantics ⇒ Object (readonly)
Returns the value of attribute like_semantics.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def like_semantics @like_semantics end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def mode @mode end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
18 19 20 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 18 def prefix @prefix end |
Instance Method Details
#call ⇒ Object
_chain_nested_filter
21 22 23 24 25 |
# File 'lib/rokaki/filter_model/nested_filter.rb', line 21 def call # _chain_nested_filter filter_key_object.keys.each do |key| deep_chain([key], filter_key_object[key]) end end |