Class: Synapse::Common::Mongo::BaseTemplate Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/common/mongo/base_template.rb

Overview

This class is abstract.

Represents a mechanism for accessing collections required by a component

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ undefined

Parameters:

  • client (Mongo::MongoClient)


18
19
20
21
# File 'lib/synapse/common/mongo/base_template.rb', line 18

def initialize(client)
  @client = client
  @database_name = 'synapse'
end

Instance Attribute Details

#database_nameString

Returns Name of the database to use.

Returns:

  • (String)

    Name of the database to use



8
9
10
# File 'lib/synapse/common/mongo/base_template.rb', line 8

def database_name
  @database_name
end

#passwordString

Returns Password to authenticate with (optional).

Returns:

  • (String)

    Password to authenticate with (optional)



14
15
16
# File 'lib/synapse/common/mongo/base_template.rb', line 14

def password
  @password
end

#usernameString

Returns Username to authenticate with (optional).

Returns:

  • (String)

    Username to authenticate with (optional)



11
12
13
# File 'lib/synapse/common/mongo/base_template.rb', line 11

def username
  @username
end