Class: HTTP::CookieJar::MozillaStore::Database
- Inherits:
-
SQLite3::Database
- Object
- SQLite3::Database
- HTTP::CookieJar::MozillaStore::Database
- Defined in:
- lib/http/cookie_jar/mozilla_store.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(file, options = {}) ⇒ Database
constructor
A new instance of Database.
- #prepare(sql) ⇒ Object
Constructor Details
#initialize(file, options = {}) ⇒ Database
Returns a new instance of Database.
45 46 47 48 49 50 51 |
# File 'lib/http/cookie_jar/mozilla_store.rb', line 45 def initialize(file, = {}) @stmts = [] = { :results_as_hash => true, }.update() super end |
Instance Method Details
#close ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/http/cookie_jar/mozilla_store.rb', line 61 def close return self if closed? @stmts.reject! { |st| st.closed? || st.close } super end |
#prepare(sql) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/http/cookie_jar/mozilla_store.rb', line 53 def prepare(sql) case st = super when SQLite3::Statement @stmts << st end st end |