lib/pricehubble/entity/base_entity.rb in pricehubble-0.4.2 vs lib/pricehubble/entity/base_entity.rb in pricehubble-1.0.0
- old
+ new
@@ -53,9 +53,10 @@
# which start with +inherited_setup_+ to allow per-concern/feature based
# initialization after BaseEntity inheritance.
#
# @param child_class [Class] the child class which inherits us
def inherited(child_class)
+ super
match = ->(sym) { sym.to_s.start_with? 'inherited_setup_' }
trigger = ->(sym) { send(sym, child_class) }
methods.select(&match).each(&trigger)
end
end