Class: AssLauncher::Enterprise::Ole::ThinApplication
- Inherits:
-
IbConnection
- Object
- IbConnection
- AssLauncher::Enterprise::Ole::ThinApplication
- Defined in:
- lib/ass_launcher/enterprise/ole.rb
Overview
Wrapper for V8xc.Application ole object
Direct Known Subclasses
Class Method Summary collapse
-
.close_all ⇒ Object
Close all opened connectons.
-
.objects ⇒ Object
Array of objects with opened connection for close all.
Instance Method Summary collapse
- #__close__ ⇒ Object
- #__closed__? ⇒ Boolean
-
#__open__(conn_str) ⇒ Object
Open connection in to infobase described in conn_str.
- #__opened__? ⇒ Boolean
-
#initialize(requirement) ⇒ ThinApplication
constructor
A new instance of ThinApplication.
Methods inherited from IbConnection
Constructor Details
#initialize(requirement) ⇒ ThinApplication
Returns a new instance of ThinApplication.
127 128 129 130 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 127 def initialize(requirement) super @opened = false end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AssLauncher::Enterprise::Ole::IbConnection
Class Method Details
.close_all ⇒ Object
Close all opened connectons
123 124 125 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 123 def self.close_all objects.each(&:__close__) end |
.objects ⇒ Object
Array of objects with opened connection for close all
118 119 120 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 118 def self.objects @objects ||= [] end |
Instance Method Details
#__close__ ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 164 def __close__ return true if __closed__? # rubocop:disable HandleExceptions begin __ole__.terminate rescue # NOP ensure @__ole_binary__ = nil @opened = false ThinApplication.objects.delete(self) end # rubocop:enable HandleExceptions true end |
#__closed__? ⇒ Boolean
160 161 162 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 160 def __closed__? !__opened__? end |
#__open__(conn_str) ⇒ Object
Open connection in to infobase described in conn_str
134 135 136 137 138 139 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 134 def __open__(conn_str) return true if __opened__? __try_open__(conn_str) self.class.objects << self __opened__? end |
#__opened__? ⇒ Boolean
156 157 158 |
# File 'lib/ass_launcher/enterprise/ole.rb', line 156 def __opened__? @opened end |