- Source
- Issues
- Documentation
- [Email](mailto:postmodern.mod3 at gmail.com)
Warnings provides a searchable and more readable Warning Message facility to Ruby. With Warnings, one can queue all warning messages generated by your code, search through them and/or print them upon exit.
- Respects
$VERBOSE
(ruby -w
) and$DEBUG
(ruby -d
) - Search Warning Messages by:
- Source File
- Source Method
- Message
- Prints Messages upon exit.
- ANSI Coloring.
require 'warnings'
def danger!
warn "Fire in the disco!"
end
danger!
Warnings.grep(/fire/)
# => [...]
Warnings.from_method('danger!')
# => [...]
Warnings.from_file('foo/bar.rb')
# => [...]
exit
#
# Warnings:
#
# fire in the disco! lib/foo/bar.rb:42
$ gem install warnings
Copyright (c) 2011 Hal Brodigan
See {file:LICENSE.txt} for details.