Module: RVGP::Pta::AvailabilityHelper
- Included in:
- Application::Config, Base::Grid, Base::Grid, Base::Validation
- Defined in:
- lib/rvgp/pta.rb
Overview
This module is intended for use in classes that wish to provide #ledger, #hledger, and #pta methods, to its instances.
Instance Method Summary collapse
-
#hledger ⇒ RVGP::Pta::HLedger
Return a new instance of RVGP::Pta::HLedger.
-
#ledger ⇒ RVGP::Pta::Ledger
Return a new instance of RVGP::Pta::Ledger.
-
#pta ⇒ RVGP::Pta::Ledger, RVGP::Pta::HLedger
Depending on what’s installed and configured, a pta adapter is returned.
Instance Method Details
#hledger ⇒ RVGP::Pta::HLedger
Return a new instance of RVGP::Pta::HLedger
22 23 24 |
# File 'lib/rvgp/pta.rb', line 22 def hledger RVGP::Pta.hledger end |
#ledger ⇒ RVGP::Pta::Ledger
Return a new instance of RVGP::Pta::Ledger
17 18 19 |
# File 'lib/rvgp/pta.rb', line 17 def ledger RVGP::Pta.ledger end |
#pta ⇒ RVGP::Pta::Ledger, RVGP::Pta::HLedger
Depending on what’s installed and configured, a pta adapter is returned. The rules that govern what adapter is choosen, works like this:
-
If RVGP::Pta.pta_adapter= has been set, then, this adapter will be returned.
-
If ledger is installed on the system, then ledger is returned
-
If hledger is installed on the system, then hledger is returned
If no pta adapters are available, an error is raised.
27 28 29 |
# File 'lib/rvgp/pta.rb', line 27 def pta RVGP::Pta.pta end |