class ActiveMongoid::Associations::Proxy

Attributes

__metadata__[RW]
base[RW]
target[RW]

Public Instance Methods

==(other) click to toggle source
# File lib/active_mongoid/associations/proxy.rb, line 29
def ==(other)
  # return false unless other
  # return true if target.object_id == other.object_id
  # return true if target.attributes == other.attributes
  target == other
end
init(base, target, metadata) { |self| ... } click to toggle source
# File lib/active_mongoid/associations/proxy.rb, line 14
def init(base, target, metadata)
  @base = base
  @target = target
  @__metadata__ = metadata
  yield(self) if block_given?
end
klass() click to toggle source
# File lib/active_mongoid/associations/proxy.rb, line 25
def klass
  __metadata__ ? __metadata__.klass : nil
end
method_missing(name, *args, &block) click to toggle source
# File lib/active_mongoid/associations/proxy.rb, line 21
def method_missing(name, *args, &block)
  target.send(name, *args, &block)
end