Class: Brightbox::ConnectionManager
- Inherits:
-
Object
- Object
- Brightbox::ConnectionManager
- Defined in:
- lib/brightbox-cli/connection_manager.rb
Instance Method Summary collapse
- #fetch_connection(account_flag = false) ⇒ Object
-
#initialize(connection_options) ⇒ ConnectionManager
constructor
A new instance of ConnectionManager.
Constructor Details
#initialize(connection_options) ⇒ ConnectionManager
Returns a new instance of ConnectionManager.
3 4 5 6 |
# File 'lib/brightbox-cli/connection_manager.rb', line 3 def initialize() @connection_options = @connection = nil end |
Instance Method Details
#fetch_connection(account_flag = false) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/brightbox-cli/connection_manager.rb', line 8 def fetch_connection(account_flag = false) if account_flag connection_with_account else @connection ||= create_connection end end |