Class: L43::Base::DataClass::DataClassClass
- Inherits:
-
Object
- Object
- L43::Base::DataClass::DataClassClass
- Defined in:
- lib/l43/base/data_class/data_class_class.rb
Instance Method Summary collapse
Instance Method Details
#==(other) ⇒ Object
8 9 10 11 |
# File 'lib/l43/base/data_class/data_class_class.rb', line 8 def ==(other) return false unless self.class === other other.to_h == to_h end |
#update_attribute(attribute, &blk) ⇒ Object
13 14 15 16 |
# File 'lib/l43/base/data_class/data_class_class.rb', line 13 def update_attribute(attribute, &blk) raise ArgumentError, "cannot update attribute #{attribute.inspect} without a block" unless blk update(attribute => blk.(to_h[attribute])) end |