I am an experienced programmer learning Ruby (and liking it a lot). I'm working on setting up a database using SQLite3. In order to better learn Ruby, I'm tracing into SQLite3. What I don't understand is, where is the code for #new for the Database and Statement classes. Actually, I expect not a #new method, but a #initialize method.
SQLite3::Database.new(file, options = {})
SQLite3::Statement.new(db, sql)
The above two statements are from the documentation. But in my code when I try to trace into this
$db = SQLite3::Database.new"MyDBfile"
it just steps over.
Then later on when I try to trace into
#$db.execute
I do get into the #execute method in the Database.rb file, but then it calls the #prepare method where I try to step into
stmt = SQLite3::Statement.new( self, sql )
but again no luck. It just steps over it.
I've scoured the source code, done searches etc but I cannot locate the initialize methods that are being called. Where are they ?
Thank you for considering this question.