Sha256: e3d84d74dfad094521f9d3212ef76d7ec93dde398e7b903098943d78fea98430

Contents?: true

Size: 473 Bytes

Versions: 3

Compression:

Stored size: 473 Bytes

Contents

require 'sqlite3'

module LND
  module Tool
    module Store
      # Abstract class for store.
      class SQLiteBase

        attr_reader :db

        # Initialize data store.
        # @param [Pathname] path data base path.
        def initialize(path = Daemon.db_path)
          @db = SQLite3::Database.new(path.to_s)
          setup
        end

        def setup
          raise Error, 'Inherit and implement the setup method.'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lnd-tool-0.3.0 lib/lnd/tool/store/sqlite_base.rb
lnd-tool-0.2.0 lib/lnd/tool/store/sqlite_base.rb
lnd-tool-0.1.0 lib/lnd/tool/store/sqlite_base.rb