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)

Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another")
Registers additional directories to be included
def self.register_directories(*dirs)
  directories.push(*dirs)
end

def self.register_extensions(*exts, &block)

Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
Registers new Annotations File Extensions
def self.register_extensions(*exts, &block)
  extensions[/\.(#{exts.join("|")})$/] = block
end

def self.register_tags(*additional_tags)

Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME")
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 = {})

Otherwise the string contains just line and text.
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