Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (18 sloc) 426 Bytes
module Arel
class Array < Relation
attributes :array, :attribute_names
deriving :initialize
include Recursion::BaseCase
def engine
@engine ||= Memory::Engine.new
end
def attributes
@attributes ||= @attribute_names.collect do |name|
Attribute.new(self, name.to_sym)
end
end
def eval
@array.collect { |row| attributes.zip(row).to_hash }
end
end
end
Something went wrong with that request. Please try again.