Class: LND::Tool::Store::SQLiteBase
- Inherits:
-
Object
- Object
- LND::Tool::Store::SQLiteBase
- Defined in:
- lib/lnd/tool/store/sqlite_base.rb
Overview
Abstract class for store.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#db ⇒ Object
readonly
Returns the value of attribute db.
Instance Method Summary collapse
-
#initialize(path = Daemon.db_path) ⇒ SQLiteBase
constructor
Initialize data store.
- #setup ⇒ Object
Constructor Details
#initialize(path = Daemon.db_path) ⇒ SQLiteBase
Initialize data store.
13 14 15 16 |
# File 'lib/lnd/tool/store/sqlite_base.rb', line 13 def initialize(path = Daemon.db_path) @db = SQLite3::Database.new(path.to_s) setup end |
Instance Attribute Details
#db ⇒ Object (readonly)
Returns the value of attribute db.
9 10 11 |
# File 'lib/lnd/tool/store/sqlite_base.rb', line 9 def db @db end |
Instance Method Details
#setup ⇒ Object
18 19 20 |
# File 'lib/lnd/tool/store/sqlite_base.rb', line 18 def setup raise Error, 'Inherit and implement the setup method.' end |