Class: NexusCli::RemoteFactory
- Inherits:
-
Object
- Object
- NexusCli::RemoteFactory
- Defined in:
- lib/nexus_cli/remote_factory.rb
Class Attribute Summary collapse
-
.configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
.connection ⇒ Object
readonly
Returns the value of attribute connection.
Class Method Summary collapse
-
.create(overrides, ssl_verify = true) ⇒ NexusCli::ProRemote, NexusCli::OSSRemote
Creates a new Nexus Remote that can connect to and communicate with the Nexus server.
Class Attribute Details
.configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/nexus_cli/remote_factory.rb', line 7 def configuration @configuration end |
.connection ⇒ Object (readonly)
Returns the value of attribute connection.
8 9 10 |
# File 'lib/nexus_cli/remote_factory.rb', line 8 def connection @connection end |
Class Method Details
.create(overrides, ssl_verify = true) ⇒ NexusCli::ProRemote, NexusCli::OSSRemote
Creates a new Nexus Remote that can connect to and communicate with the Nexus server.
17 18 19 20 21 |
# File 'lib/nexus_cli/remote_factory.rb', line 17 def create(overrides, ssl_verify=true) @configuration = overrides ? Configuration.from_overrides(overrides) : Configuration.from_file @connection = Connection.new(configuration, ssl_verify) running_nexus_pro? ? ProRemote.new(overrides, ssl_verify) : OSSRemote.new(overrides, ssl_verify) end |