A spec knows where a generator was found and how to instantiate it. Metadata include the generator’s name, its base path, and the source which yielded it (PathSource, GemPathSource, etc.)
| Public Attributes | |
|---|---|
| name | |
| path | |
| source | |
| Public Methods | |
|---|---|
| class_ |
|
| class_ |
|
| klass | Look up the generator class. Require its class file, find the class in ObjectSpace, tag it with this spec, and return. |
| new | |
| Private Methods | |
|---|---|
| lookup_ |
Search for the first Class descending from Rails::Generator::Base whose name matches the requested class name. |
<code/>and<pre/>for code samples.