Class: WolfCore::ValueObject
- Inherits:
-
DomainObject
- Object
- DomainObject
- WolfCore::ValueObject
- Defined in:
- lib/wolf_core/domain/value_object.rb
Instance Method Summary collapse
Methods inherited from DomainObject
#attributes, #attributes=, cast, cast_all, create, create_all, define_attributes, extract_success_key, #initialize, #parse_attributes, parse_params, #reset_changes, #valid?
Constructor Details
This class inherits a constructor from WolfCore::DomainObject
Instance Method Details
#==(other) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/wolf_core/domain/value_object.rb', line 5 def ==(other) return false unless other.is_a?(self.class) self.class.fields.each do |key| return false unless attributes[key] == other.attributes[key] end true end |