mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
adding a table and engine
This commit is contained in:
parent
139038130d
commit
bd5f19371f
4 changed files with 31 additions and 2 deletions
|
@ -1,2 +1,3 @@
|
||||||
module Arel
|
require 'arel/version'
|
||||||
end
|
require 'arel/table'
|
||||||
|
require 'arel/sql/engine'
|
||||||
|
|
10
lib/arel/sql/engine.rb
Normal file
10
lib/arel/sql/engine.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module Arel
|
||||||
|
module Sql
|
||||||
|
class Engine
|
||||||
|
def self.new thing
|
||||||
|
warn "#{caller.first} -- Engine will be removed"
|
||||||
|
thing
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
15
lib/arel/table.rb
Normal file
15
lib/arel/table.rb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
module Arel
|
||||||
|
class Table
|
||||||
|
@engine = nil
|
||||||
|
class << self; attr_accessor :engine; end
|
||||||
|
|
||||||
|
def initialize table_name, engine
|
||||||
|
@table_name = table_name
|
||||||
|
@engine = engine
|
||||||
|
end
|
||||||
|
|
||||||
|
def [] attribute
|
||||||
|
raise attribute
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
3
lib/arel/version.rb
Normal file
3
lib/arel/version.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module Arel
|
||||||
|
VERSION = '0.4.1.beta.1'
|
||||||
|
end
|
Loading…
Reference in a new issue