Method: Rails::Generator::Spec#klass

Defined in:
lib/rails_generator/spec.rb

#klassObject

Look up the generator class. Require its class file, find the class in ObjectSpace, tag it with this spec, and return.



15
16
17
18
19
20
21
22
# File 'lib/rails_generator/spec.rb', line 15

def klass
  unless @klass
    require class_file
    @klass = lookup_class
    @klass.spec = self
  end
  @klass
end