module Arel::Nodes

Public Class Methods

build_quoted(other, attribute = nil) click to toggle source
# File lib/arel/nodes/casted.rb, line 26
def self.build_quoted other, attribute = nil
  case other
    when Arel::Nodes::Node, Arel::Attributes::Attribute, Arel::Table, Arel::Nodes::BindParam, Arel::SelectManager, Arel::Nodes::Quoted
      other
    else
      case attribute
        when Arel::Attributes::Attribute
          Casted.new other, attribute
        else
          Quoted.new other
      end
  end
end