Method: Module#each_class
- Defined in:
- lib/extra/module.rb
#each_class ⇒ Object
Go through each defined class in the module. Credit to apeiros for this =)
4 5 6 7 8 9 |
# File 'lib/extra/module.rb', line 4 def each_class constants.each { |constant_name| constant = const_get(constant_name.intern) yield constant if constant.class == Class && constant.name =~ /#{self.name}/ } end |