Class: Zdi::DocumentWrapper

Inherits:
Hashie::Mash
  • Object
show all
Extended by:
ClassMethods
Includes:
DocumentHelpers
Defined in:
lib/zentradi/document_wrapper.rb

Defined Under Namespace

Modules: ClassMethods, MongoCursorMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassMethods

mongo_collection_method_wrap, unwrap, wrap

Methods included from DocumentHelpers

#destroy, #id, #new?, #save

Constructor Details

#initialize(collection, hash = {}) ⇒ DocumentWrapper

Returns a new instance of DocumentWrapper.



48
49
50
51
# File 'lib/zentradi/document_wrapper.rb', line 48

def initialize(collection, hash = {})
  super(hash)
  @collection = collection
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



46
47
48
# File 'lib/zentradi/document_wrapper.rb', line 46

def collection
  @collection
end