mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
ce7bbc3685
Similar to the work done in #38636, instead of using case statements we can make these classes respond to `fetch_attribute`. New classes can implement `fetch_attribute` instead of adding to the case statement, it's more object oriented, and nicer looking. Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com>
11 lines
198 B
Ruby
11 lines
198 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Arel # :nodoc: all
|
|
module Nodes
|
|
class Grouping < Unary
|
|
def fetch_attribute(&block)
|
|
expr.fetch_attribute(&block)
|
|
end
|
|
end
|
|
end
|
|
end
|