Methods

Class/Module Index [+]

Quicksearch

Rails::Generator::PathSource

PathSource looks for generators in a filesystem directory.

Attributes

path[R]

Public Class Methods

new(label, path) click to toggle source
# File lib/rails_generator/lookup.rb, line 185
def initialize(label, path)
  super label
  @path = path
end

Public Instance Methods

each() click to toggle source

Yield each eligible subdirectory.

# File lib/rails_generator/lookup.rb, line 191
def each
  Dir["#{path}/[a-z]*"].each do |dir|
    if File.directory?(dir)
      yield Spec.new(File.basename(dir), dir, label)
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.