Sources enumerate (yield from each) generator specs which describe where to find and how to create generators. Enumerable is mixed in so, for example, source.collect will retrieve every generator. Sources may be assigned a label to distinguish them.
Methods
Included Modules
Attributes
[R] | label |
Class Public methods
Source: show
# File rails/railties/lib/rails_generator/lookup.rb, line 152 def initialize(label) @label = label end
Instance Public methods
The each method must be implemented in subclasses. The base implementation raises an error.
Source: show
# File rails/railties/lib/rails_generator/lookup.rb, line 158 def each raise NotImplementedError end
Return a convenient sorted list of all generator names.
Source: show
# File rails/railties/lib/rails_generator/lookup.rb, line 163 def names map { |spec| spec.name }.sort end