我正在尝试通过扩展 Sequel 对象/模块来创建一个处理数据库连接的库。但我无法通过这个:
require 'sequel'
class Database
include Sequel
def connect()
self.ado(:conn_string=>"Server=homeServer;Provider=SQLNCLI10;Database=test;Trusted_Connection=yes;")
end
end
db = LocalDatabase.new()
db.connect()
我收到以下错误:test.rb:5:in connect': undefined method
ado' for # (NoMethodError) from test.rb:10:in `'
为什么我看不到ado方法?