Class: ADS
- Inherits:
-
Object
- Object
- ADS
- Includes:
- Singleton
- Defined in:
- lib/active_record/connection_adapters/advantage_adapter.rb
Overview
Singleton class to hold a valid instance of the AdvantageInterface across all connections
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#initialize ⇒ ADS
constructor
A new instance of ADS.
Constructor Details
#initialize ⇒ ADS
Returns a new instance of ADS.
31 32 33 34 35 36 |
# File 'lib/active_record/connection_adapters/advantage_adapter.rb', line 31 def initialize require "advantage" unless defined? Advantage @api = Advantage::AdvantageInterface.new() raise LoadError, "Could not load ACE library" if Advantage::API.ads_initialize_interface(@api) == 0 raise LoadError, "Could not initialize ACE library" if @api.ads_init() == 0 end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
29 30 31 |
# File 'lib/active_record/connection_adapters/advantage_adapter.rb', line 29 def api @api end |