@@ -196,22 +196,25 @@ def gather_constants
196196 T ::Array [ Symbol ] ,
197197 )
198198
199- QUERY_METHODS = T . let ( begin
200- # Grab all Query methods
201- query_methods = ActiveRecord ::QueryMethods . instance_methods ( false )
202- # Grab all Spawn methods
203- query_methods |= ActiveRecord ::SpawnMethods . instance_methods ( false )
204- # Remove the ones we know are private API
205- query_methods -= [ :arel , :build_subquery , :construct_join_dependency , :extensions , :spawn ]
206- # Remove "where" which needs a custom return type for WhereChains
207- query_methods -= [ :where ]
208- # Remove the methods that ...
209- query_methods
210- . grep_v ( /_clause$/ ) # end with "_clause"
211- . grep_v ( /_values?$/ ) # end with "_value" or "_values"
212- . grep_v ( /=$/ ) # end with "=""
213- . grep_v ( /(?<!uniq)!$/ ) # end with "!" except for "uniq!"
214- end , T ::Array [ Symbol ] )
199+ QUERY_METHODS = T . let (
200+ begin
201+ # Grab all Query methods
202+ query_methods = ActiveRecord ::QueryMethods . instance_methods ( false )
203+ # Grab all Spawn methods
204+ query_methods |= ActiveRecord ::SpawnMethods . instance_methods ( false )
205+ # Remove the ones we know are private API
206+ query_methods -= [ :arel , :build_subquery , :construct_join_dependency , :extensions , :spawn ]
207+ # Remove "where" which needs a custom return type for WhereChains
208+ query_methods -= [ :where ]
209+ # Remove the methods that ...
210+ query_methods
211+ . grep_v ( /_clause$/ ) # end with "_clause"
212+ . grep_v ( /_values?$/ ) # end with "_value" or "_values"
213+ . grep_v ( /=$/ ) # end with "=""
214+ . grep_v ( /(?<!uniq)!$/ ) # end with "!" except for "uniq!"
215+ end ,
216+ T ::Array [ Symbol ] ,
217+ )
215218 WHERE_CHAIN_QUERY_METHODS = T . let (
216219 ActiveRecord ::QueryMethods ::WhereChain . instance_methods ( false ) ,
217220 T ::Array [ Symbol ] ,
0 commit comments