Module: Notes
- Defined in:
- lib/notes.rb,
lib/notes/scanner.rb,
lib/notes/version.rb
Defined Under Namespace
Constant Summary collapse
- TAGS =
Default tags to grep in source code. They are TODO, FIXME, and XXX.
%w[TODO FIXME XXX]
- VERSION =
"0.1.2"
Class Method Summary collapse
-
.scan(source, tags = nil, &block) ⇒ Enumerator
Scan a source string.
-
.scan_file(file, tags = nil, &block) ⇒ Enumerator
Scan a file.
Instance Method Summary collapse
-
#notes(tags = nil, &block) ⇒ Enumerator
Add a :notes method to an object.
Class Method Details
Instance Method Details
#notes(tags = nil, &block) ⇒ Enumerator
Add a :notes method to an object
89 90 91 92 93 94 |
# File 'lib/notes.rb', line 89 def notes( = nil, &block) block.nil? and return enum_for(__method__, , &block) scanner = Scanner.new(, &block) source = (self.respond_to? :read) ? self.read : self.to_s scanner.scan(source) end |