https://github.com/philnash/omg
Quick and dirty debugging any ruby!
https://github.com/philnash/omg
Last synced: 6 months ago
JSON representation
Quick and dirty debugging any ruby!
- Host: GitHub
- URL: https://github.com/philnash/omg
- Owner: philnash
- License: mit
- Created: 2010-10-11T11:44:40.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2010-11-04T01:05:23.000Z (almost 15 years ago)
- Last Synced: 2024-04-14T07:46:30.831Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 102 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= omg
Quick and dirty debugging anywhere!
Sometimes you just want to see whether a method was called. Those times you don't want to write out some rubbish just to see that. Why not just write
def some_method
omg!
# do stuff
endWhen the method is called, in the log you will find
~~~~~~~~~~~~~~~~~~~~~~~~~~~
OMG!
some_method called!
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Or, pass an object to omg! and it will print out the result of the object's inspect method.Works with Rails.logger if it is available or $stdout if it isn't.
Want your own logger? Of course! Just grab the OmgLogger instance and set it to your logger like this:
omg_logger = OmgLogger.instance
omg_logger.log_with(custom_logger, :custom_logging_method)Easy.
== Copyright
Copyright (c) 2010 philnash. See LICENSE for details.