Module: ObjectTable::Factory::ClassMethods
- Defined in:
- lib/object_table/factory.rb
Instance Method Summary collapse
Instance Method Details
#__table_cls__ ⇒ Object
17 18 19 |
# File 'lib/object_table/factory.rb', line 17 def __table_cls__ self end |
#fully_include(mixin) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/object_table/factory.rb', line 21 def fully_include(mixin) include(mixin) constants = constants(false) CLASS_MAP.each do |name, const| child_cls = send(name) # create a new subclass if there isn't already one child_cls = const_set(const, Class.new(child_cls)) unless constants.include?(child_cls) child_cls.send(:include, mixin) end end |