Class: ActiverecordAnyOf::AlternativeBuilder::Builder
- Inherits:
-
Object
- Object
- ActiverecordAnyOf::AlternativeBuilder::Builder
- Defined in:
- lib/activerecord_any_of/alternative_builder.rb
Overview
Common methods for both the positive builder and the negative one.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#queries_joins_values ⇒ Object
Returns the value of attribute queries_joins_values.
Instance Method Summary collapse
-
#initialize(context, *source_queries) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(context, *source_queries) ⇒ Builder
Returns a new instance of Builder.
29 30 31 32 33 |
# File 'lib/activerecord_any_of/alternative_builder.rb', line 29 def initialize(context, *source_queries) @context = context @source_queries = source_queries @queries_joins_values = { includes: [], joins: [], references: [] } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object (private)
96 97 98 |
# File 'lib/activerecord_any_of/alternative_builder.rb', line 96 def method_missing(method_name, *args, &block) @context.send(method_name, *args, &block) end |
Instance Attribute Details
#queries_joins_values ⇒ Object
Returns the value of attribute queries_joins_values.
27 28 29 |
# File 'lib/activerecord_any_of/alternative_builder.rb', line 27 def queries_joins_values @queries_joins_values end |