mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
MozillaStore: Add #filename, #close and #closed?.
This commit is contained in:
parent
a7575ae3df
commit
4512c333b4
1 changed files with 15 additions and 0 deletions
|
|
@ -63,6 +63,21 @@ class HTTP::CookieJar
|
|||
@gc_index = 0
|
||||
end
|
||||
|
||||
# The file name of the SQLite3 database given in initialization.
|
||||
attr_reader :filename
|
||||
|
||||
# Closes the SQLite3 database. After closing, any operation may
|
||||
# raise an error.
|
||||
def close
|
||||
@db.close
|
||||
self
|
||||
end
|
||||
|
||||
# Tests if the SQLite3 database is closed.
|
||||
def closed?
|
||||
@db.closed?
|
||||
end
|
||||
|
||||
# Returns the schema version of the database.
|
||||
def schema_version
|
||||
@schema_version ||= @db.execute("PRAGMA user_version").first[0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue