Class: RubiGen::PathSource

### Home Classes Methods

### In Files

- lib/rubigen/lookup.rb

### Parent

RubiGen::Source

### Methods

- ::new
- #==
- #each

### Files

- History.txt
- License.txt
- Manifest.txt
- Todo.txt
- README.txt
- index.txt
- version-raw.txt
- version.txt

### Class/Module Index

Quicksearch

- RubiGen
- RubiGen::AbstractGemSource
- RubiGen::Base
- RubiGen::Commands
- RubiGen::Commands::Base
- RubiGen::Commands::Create
- RubiGen::Commands::Destroy
- RubiGen::Commands::List
- RubiGen::Commands::RewindBase
- RubiGen::Commands::Update
- RubiGen::GemPathSource
- RubiGen::GeneratedAttribute
- RubiGen::GeneratorError
- RubiGen::GeneratorTestHelper
- RubiGen::Lookup
- RubiGen::Lookup::ClassMethods
- RubiGen::Manifest
- RubiGen::Options
- RubiGen::Options::ClassMethods
- RubiGen::PathFilteredSource
- RubiGen::PathSource
- RubiGen::Scripts
- RubiGen::Scripts::Base
- RubiGen::Scripts::Destroy
- RubiGen::Scripts::Generate
- RubiGen::Scripts::Update
- RubiGen::Source
- RubiGen::Spec
- RubiGen::UsageError
- Rubigen
- Rubigen::CLI
- Dir
- Object

No matching classes.

# RubiGen::PathSource

PathSource looks for generators in a filesystem directory.

### Attributes

path[R]

### Public Class Methods

new(label, path) click to toggle source

    # File lib/rubigen/lookup.rb, line 216
    def initialize(label, path)
      super label
      @path = File.expand_path path
    end

### Public Instance Methods

==(source) click to toggle source

    # File lib/rubigen/lookup.rb, line 230
    def ==(source)
      self.class == source.class && path == source.path
    end

each() click to toggle source

Yield each eligible subdirectory.

    # File lib/rubigen/lookup.rb, line 222
    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.