Module: EntityStore::EntityValue

Defined in:
lib/entity_store/entity_value.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



3
4
5
6
7
8
# File 'lib/entity_store/entity_value.rb', line 3

def self.included(klass)
  klass.class_eval do
    include HashSerialization
    include Attributes
  end
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
13
14
15
# File 'lib/entity_store/entity_value.rb', line 10

def ==(other)
  attributes.each_key do |attr|
    return false unless other.respond_to?(attr) && send(attr) == other.send(attr)
  end
  return true
end

#inspectObject



17
18
19
# File 'lib/entity_store/entity_value.rb', line 17

def inspect
  "<#{self.class.name} #{self.attributes.inspect}>"
end