Module: Cuboid::Support::Mixins::Parts
- Included in:
- Application
- Defined in:
- lib/cuboid/support/mixins/parts.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/cuboid/support/mixins/parts.rb', line 7 def self.included( base ) dir = Utilities.caller_path( 3 ).split( '.rb', 2 ).first Dir.glob( "#{dir}/parts/**/*.rb" ).each { |f| require f } parts = base.const_get( :Parts ) parts.constants.each do |part_name| base.include parts.const_get( part_name ) end end |