Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Provides a better Warning Message facility to Ruby.
Ruby
tree: 09b8c8c4bf

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.document
.gitignore
.rspec
.yardopts
ChangeLog.md
LICENSE.txt
README.md
Rakefile
gemspec.yml
warnings.gemspec

README.md

warnings

Description

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.

Features

  • Respects $VERBOSE (ruby -w) and $DEBUG (ruby -d)
  • Search Warning Messages by:
    • Source File
    • Source Method
    • Message
  • Prints Messages upon exit.
  • ANSI Coloring.

Examples

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

Requirements

Install

$ gem install warnings

Copyright

Copyright (c) 2011 Hal Brodigan

See {file:LICENSE.txt} for details.

Something went wrong with that request. Please try again.