Class: Rails::Generator::GemPathSource
- Inherits:
-
AbstractGemSource
- Object
- Source
- AbstractGemSource
- Rails::Generator::GemPathSource
- Defined in:
- lib/rails_generator/lookup.rb
Overview
GemPathSource looks for generators within any RubyGem’s /rails_generators/<generator_name>_generator.rb file.
Instance Attribute Summary
Attributes inherited from Source
Instance Method Summary collapse
-
#each ⇒ Object
Yield each generator within rails_generator subdirectories.
Methods inherited from AbstractGemSource
Methods inherited from Source
Constructor Details
This class inherits a constructor from Rails::Generator::AbstractGemSource
Instance Method Details
#each ⇒ Object
Yield each generator within rails_generator subdirectories.
225 226 227 228 229 |
# File 'lib/rails_generator/lookup.rb', line 225 def each generator_full_paths.each do |generator| yield Spec.new(File.basename(generator).sub(/_generator.rb$/, ''), File.dirname(generator), label) end end |