new

new(tag) Class Public methods

enumerate

enumerate(tag, options={}) Class Public methods Prints all annotations with tag tag under the root directories app, config, db, lib, and test (recursively). Additional directories may be added using a comma-delimited list set using ENV['SOURCE_ANNOTATION_DIRECTORIES']. Directories may also be explicitly set using the :dirs key in options. SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true If options has a :tag flag, it will be passed to each annotation'

to_s

to_s(options={}) Instance Public methods Returns a representation of the annotation that looks like this: [126] [TODO] This algorithm is simple and clearly correct, make it faster. If options has a flag :tag the tag is shown as in the example above. Otherwise the string contains just line and text.

directories

directories() Class Public methods

to_s

to_s(format = :default) Instance Public methods Also aliased as: to_default_s

to_formatted_s

to_formatted_s(format = :default) Instance Public methods Gives a human readable format of the range. (1..100).to_formatted_s # => "1..100" to_s

to_default_s

to_default_s(format = :default) Instance Public methods Alias for: to_s

overlaps?

overlaps?(other) Instance Public methods Compare two ranges and see if they overlap each other (1..5).overlaps?(4..6) # => true (1..5).overlaps?(7..9) # => false

include_with_range?

include_with_range?(value) Instance Public methods Extends the default Range#include? to support range comparisons. (1..5).include?(1..5) # => true (1..5).include?(2..3) # => true (1..5).include?(2..6) # => false The native Range#include? behavior is untouched. ('a'..'f').include?('c') # => true (5..9).include?(11) # => false

validate

validate() Instance Public methods