Parent

Methods

Included Modules

RubiGen::Source

Sources enumerate (yield from #) 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.

Attributes

label[R]

Public Class Methods

new(label) click to toggle source
     # File lib/rubigen/lookup.rb, line 189
189:     def initialize(label)
190:       @label = label
191:     end

Public Instance Methods

each() click to toggle source

The each method must be implemented in subclasses. The base implementation raises an error.

     # File lib/rubigen/lookup.rb, line 195
195:     def each
196:       raise NotImplementedError
197:     end
names(filter = nil) click to toggle source

Return a convenient sorted list of all generator names.

     # File lib/rubigen/lookup.rb, line 200
200:     def names(filter = nil)
201:       inject([]) do |mem, spec|
202:         case filter
203:         when :visible
204:           mem << spec.name if spec.visible?
205:         end
206:         mem
207:       end.sort
208:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.