class Mongoo::Embedded::Base

Public Class Methods

new(parent, hash={}, key=nil) click to toggle source
# File lib/mongoo/embedded/base.rb, line 5
def initialize(parent, hash={}, key=nil)
  @parent    = parent
  @persisted = persisted?
  @key       = key
  init_from_hash(hash)
end

Public Instance Methods

==(other) click to toggle source
# File lib/mongoo/embedded/base.rb, line 32
def ==(other)
  to_hash == other.to_hash
end
collection_name() click to toggle source
# File lib/mongoo/embedded/base.rb, line 28
def collection_name
  @parent.collection_name
end
conn() click to toggle source
# File lib/mongoo/embedded/base.rb, line 24
def conn
  @parent.conn
end
db() click to toggle source
# File lib/mongoo/embedded/base.rb, line 20
def db
  @parent.db
end
key() click to toggle source
# File lib/mongoo/embedded/base.rb, line 12
def key
  @key
end
persisted?() click to toggle source
# File lib/mongoo/embedded/base.rb, line 16
def persisted?
  @parent.persisted?
end