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.
42 43 44 45 46 47 48 |
# File 'lib/http/cookie_jar/mozilla_store.rb', line 42 def initialize(file, = {}) @stmts = [] = { :results_as_hash => true, }.update() super end |
Instance Method Details
#close ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/http/cookie_jar/mozilla_store.rb', line 58 def close return self if closed? @stmts.reject! { |st| st.closed? || st.close } super end |
#prepare(sql) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/http/cookie_jar/mozilla_store.rb', line 50 def prepare(sql) case st = super when SQLite3::Statement @stmts << st end st end |