class Rails::SourceAnnotationExtractor::Annotation
def self.directories
def self.directories @@directories ||= %w(app config db lib test) end
def self.extensions
def self.extensions @@extensions ||= {} end
def self.register_directories(*dirs)
Registers additional directories to be included
def self.register_directories(*dirs) directories.push(*dirs) end
def self.register_extensions(*exts, &block)
Registers new Annotations File Extensions
def self.register_extensions(*exts, &block) extensions[/\.(#{exts.join("|")})$/] = block end
def self.register_tags(*additional_tags)
Registers additional tags
def self.register_tags(*additional_tags) tags.push(*additional_tags) end
def self.tags
def self.tags @@tags ||= %w(OPTIMIZE FIXME TODO) end
def to_s(options = {})
If +options+ has a flag :tag the tag is shown as in the example above.
[126] [TODO] This algorithm is simple and clearly correct, make it faster.
Returns a representation of the annotation that looks like this:
def to_s(options = {}) s = +"[#{line.to_s.rjust(options[:indent])}] " s << "[#{tag}] " if options[:tag] s << text end