Class: Utracker::MongoDB::Drawer
- Inherits:
-
Drawer
- Object
- Drawer
- Utracker::MongoDB::Drawer
- Defined in:
- lib/utracker/mongodb/drawer.rb
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Returns the value of attribute database.
Instance Method Summary collapse
-
#initialize(database_name: "utracker", collection_name: "entries") ⇒ Drawer
constructor
A new instance of Drawer.
Constructor Details
#initialize(database_name: "utracker", collection_name: "entries") ⇒ Drawer
Returns a new instance of Drawer.
6 7 8 9 10 |
# File 'lib/utracker/mongodb/drawer.rb', line 6 def initialize(database_name: "utracker", collection_name: "entries") @client = Mongo::MongoClient.new @database = @client[database_name] @collection_name = collection_name end |
Instance Attribute Details
#database ⇒ Object (readonly)
Returns the value of attribute database.
4 5 6 |
# File 'lib/utracker/mongodb/drawer.rb', line 4 def database @database end |