Class: ParamsReady::Query::ArrayGrouping
- Inherits:
-
Parameter::StructParameter
- Object
- Parameter::AbstractParameter
- Parameter::Parameter
- Parameter::AbstractStructParameter
- Parameter::StructParameter
- ParamsReady::Query::ArrayGrouping
- Includes:
- Parameter::GroupingLike
- Defined in:
- lib/params_ready/query/array_grouping.rb
Constant Summary
Constants inherited from Parameter::AbstractStructParameter
Parameter::AbstractStructParameter::EMPTY_HASH
Instance Attribute Summary
Attributes inherited from Parameter::AbstractParameter
Instance Method Summary collapse
- #context_for_predicates(restriction) ⇒ Object
- #operator ⇒ Object
- #predicates ⇒ Object
- #to_query(arel_table, context: Restriction.blanket_permission) ⇒ Object
Methods included from Parameter::GroupingLike
#eligible_for_query?, #predicate_group, #test, #to_query_if_eligible
Methods included from Marshaller::ParameterModule
Methods inherited from Parameter::AbstractStructParameter
#[], #[]=, #find_in_hash, #for_frontend, #for_model, #for_output, #wrap_output
Methods included from Parameter::ComplexParameter
Methods inherited from Parameter::Parameter
#allows_undefined?, #definite_default?, #eligible_for_output?, #find_in_hash, #format, #format_self_permitted, #freeze, #hash, #hash_key, #initialize, #inspect_content, #is_default?, #is_definite?, #is_nil?, #is_undefined?, #memo, #memo!, #nil_default?, #populate_other, #set_from_input, #set_value, #to_hash_if_eligible, #unwrap, #unwrap_or, #wrap_output
Methods inherited from Parameter::AbstractParameter
#==, #dup, #initialize, #inspect, intent_for_children, #match?, #populate, #to_hash, #update_if_applicable, #update_in
Methods included from Extensions::Freezer
#freeze_variable, #freeze_variables, #variables_to_freeze
Methods included from Parameter::FromHash
Methods included from Extensions::Freezer::InstanceMethods
Constructor Details
This class inherits a constructor from ParamsReady::Parameter::Parameter
Instance Method Details
#context_for_predicates(restriction) ⇒ Object
19 20 21 |
# File 'lib/params_ready/query/array_grouping.rb', line 19 def context_for_predicates(restriction) restriction.for_children(self) end |
#operator ⇒ Object
15 16 17 |
# File 'lib/params_ready/query/array_grouping.rb', line 15 def operator self[:operator].unwrap end |
#predicates ⇒ Object
11 12 13 |
# File 'lib/params_ready/query/array_grouping.rb', line 11 def predicates self[:array].to_a end |
#to_query(arel_table, context: Restriction.blanket_permission) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/params_ready/query/array_grouping.rb', line 23 def to_query(arel_table, context: Restriction.) array = self[:array] context = array.intent_for_children(context) super arel_table, context: context end |