Class: Bigamy::MongoBelongsTo

Inherits:
BelongsTo show all
Defined in:
lib/bigamy/mongo.rb

Instance Attribute Summary

Attributes inherited from Proxy

#me, #methods_added, #name, #options, #primary_key

Instance Method Summary collapse

Methods inherited from BelongsTo

#add_getter, #add_setter, #foreign_key

Methods inherited from Proxy

#add_getter, #add_setter, #create_accessors, #divorce_everyone, #foreign_key, #root_klass, #root_klass_name, #serialize_foreign_key, #target_klass, #target_klass_name

Constructor Details

#initialize(parent, name, options) ⇒ MongoBelongsTo

Returns a new instance of MongoBelongsTo.



4
5
6
7
# File 'lib/bigamy/mongo.rb', line 4

def initialize parent, name, options
  super
  me.key foreign_key
end