# File lib/arel/table.rb, line 10 def initialize name, engine = Table.engine @name = name.to_s @engine = engine @columns = nil @aliases = [] @table_alias = nil @primary_key = nil if Hash === engine @engine = engine[:engine] || Table.engine @columns = attributes_for engine[:columns] # Sometime AR sends an :as parameter to table, to let the table know # that it is an Alias. We may want to override new, and return a # TableAlias node? @table_alias = engine[:as] unless engine[:as].to_s == @name end end