Module: Kernel
- Defined in:
- lib/todonotes/kernel.rb
Overview
Define todo- and fixme commands to global usage.
Instance Method Summary collapse
-
#fixme(comment = 'FixMe', &block) ⇒ Object
Add a fixme-command.
-
#todo(comment = 'ToDo', &block) ⇒ Object
(also: #to)
Usage 1 (only message): todo “my todo-message”“.
Instance Method Details
#fixme(comment = 'FixMe', &block) ⇒ Object
Add a fixme-command.
Can be used to mark available code.
See also #todo for the usage.
40 41 42 43 |
# File 'lib/todonotes/kernel.rb', line 40 def fixme( comment = 'FixMe', &block) raise NotImplementedError if Todonotes::TODONOTES.raise_fixme? Todonotes::TODONOTES.todo(comment, :FixMe, &block) end |
#todo(comment = 'ToDo', &block) ⇒ Object Also known as: to
Usage 1 (only message):
todo "my todo-message""
Usage 2 (only temporary result):
todo { "temporary result" }
todo do
"temporary result"
end
Usage 3(message and temporary result):
todo ('message') { "temporary result" }
todo ('message') do
"temporary result"
end
22 23 24 25 |
# File 'lib/todonotes/kernel.rb', line 22 def todo( comment = 'ToDo', &block) raise NotImplementedError if Todonotes::TODONOTES.raise_todo? Todonotes::TODONOTES.todo(comment, &block) end |