lib/rubigen/lookup.rb
# Lookup missing generators using const_missing.  This allows any
# generator to reference another without having to know its location:
# RubyGems, ~/.rubigen/generators, and APP_ROOT/generators.
Lookup missing generators using const_missing.  This allows any
generator to reference another without having to know its location:
RubyGems, ~/.rubigen/generators, and APP_ROOT/generators.
Lookup missing generators using const_missing . This allows any generator to reference another without having to know its location : RubyGems ~ / . rubigen / generators and APP_ROOT / generators .
def lookup_missing_generator(class_id)
      if md = /(.+)Generator$/.match(class_id.to_s)
        name = md.captures.first.demodulize.underscore
        RubiGen::Base.active.lookup(name).klass
      else
        const_missing_before_generators(class_id)
      end
    end
def lookup_missing_generator ( class_id ) if md = / (.+)Generator$ / . match ( class_id . to_s ) name = md . captures . first . demodulize . underscore RubiGen :: Base . active . lookup ( name ) . klass else const_missing_before_generators ( class_id ) end end
Lookup missing generators using const_missing.
Lookup missing generators using const_missing .
class_id
<not_specific>