Module: Elastictastic::EmbeddedDocument

Extended by:
ActiveSupport::Concern
Defined in:
lib/elastictastic/embedded_document.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



26
27
28
# File 'lib/elastictastic/embedded_document.rb', line 26

def ==(other)
  other.nil? ? false : @_attributes == other.read_attributes && @_embeds == other.read_embeds
end

#attributesObject



22
23
24
# File 'lib/elastictastic/embedded_document.rb', line 22

def attributes
  {}
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/elastictastic/embedded_document.rb', line 30

def eql?(other)
  self.class == other.class && self == other
end

#initialize_copy(original) ⇒ Object



18
19
20
# File 'lib/elastictastic/embedded_document.rb', line 18

def initialize_copy(original)
  self.write_attributes(original.read_attributes.dup)
end