diff options
Diffstat (limited to 'lib/arel/engines/memory/relations/array.rb')
-rw-r--r-- | lib/arel/engines/memory/relations/array.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/arel/engines/memory/relations/array.rb b/lib/arel/engines/memory/relations/array.rb deleted file mode 100644 index 028f5c0269..0000000000 --- a/lib/arel/engines/memory/relations/array.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Arel - class Array - include Relation - - attr_reader :array, :attribute_names_and_types - include Recursion::BaseCase - - def initialize(array, attribute_names_and_types) - @array = array - @attribute_names_and_types = attribute_names_and_types - @engine = nil - @attributes = nil - end - - def engine - @engine ||= Memory::Engine.new - end - - def attributes - @attributes ||= begin - attrs = @attribute_names_and_types.collect do |attribute, type| - attribute = type.new(self, attribute) if Symbol === attribute - attribute - end - Header.new(attrs) - end - end - - def format(attribute, value) - value - end - - def eval - @array.collect { |r| Row.new(self, r) } - end - end -end |