Module: GnuCash
- Defined in:
- lib/gnucash.rb,
lib/gnucash/invoice.rb,
lib/gnucash/options.rb,
lib/gnucash/timestamps.rb,
lib/gnucash/invoice/entry.rb,
lib/gnucash/invoice/terms.rb,
lib/gnucash/invoice/runner.rb,
lib/gnucash/invoice/printer.rb,
lib/gnucash/invoice/version.rb,
lib/gnucash/invoice/currency.rb,
lib/gnucash/invoice/customer.rb
Defined Under Namespace
Modules: Options, Timestamps
Classes: Invoice, NoDatabaseConnection
Class Method Summary
collapse
Class Method Details
.connect!(db) ⇒ Object
19
20
21
|
# File 'lib/gnucash.rb', line 19
def self.connect! db
@connection = Sequel.connect "sqlite://#{db}"
end
|
.connection ⇒ Object
14
15
16
|
# File 'lib/gnucash.rb', line 14
def self.connection
@connection or raise NoDatabaseConnection
end
|
.root ⇒ Object
24
25
26
|
# File 'lib/gnucash.rb', line 24
def self.root
@root ||= Pathname.new File.realpath(File.join(__FILE__, '../..'))
end
|