Class: Couchbase::Options::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/options.rb

Overview

Options for Cluster.connect

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authenticator: nil) {|self| ... } ⇒ Cluster

Creates an instance of options for Cluster.connect

Parameters:

Yield Parameters:



1105
1106
1107
1108
# File 'lib/couchbase/options.rb', line 1105

def initialize(authenticator: nil)
  @authenticator = authenticator
  yield self if block_given?
end

Instance Attribute Details

#authenticatorPasswordAuthenticator, CertificateAuthenticator



1098
1099
1100
# File 'lib/couchbase/options.rb', line 1098

def authenticator
  @authenticator
end

Instance Method Details

#authenticate(username, password) ⇒ Object

Parameters:

  • username (String)
  • password (String)


1112
1113
1114
# File 'lib/couchbase/options.rb', line 1112

def authenticate(username, password)
  @authenticator = PasswordAuthenticator.new(username, password)
end