Class: Couchbase::Options::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/options.rb
more...

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:

[View source]

1150
1151
1152
1153
# File 'lib/couchbase/options.rb', line 1150

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

Instance Attribute Details

#authenticatorPasswordAuthenticator, CertificateAuthenticator


1143
1144
1145
# File 'lib/couchbase/options.rb', line 1143

def authenticator
  @authenticator
end

Instance Method Details

#authenticate(username, password) ⇒ Object

Parameters:

  • username (String)
  • password (String)
[View source]

1157
1158
1159
# File 'lib/couchbase/options.rb', line 1157

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