Class: LogBuddy
LogBuddy is a developer tool for easy logging while testing, debugging, and inspecting.
Log shortcut method to give you easy, concise output of variables with their names and values.
Examples:
a = "foo"
@a = "my var"
def bark
"woof!"
end
d { a } # logs "a = 'foo'"
d { @a } # logs "@a = 'my var'"
d { bark } # logs "bark = woof!"
Child modules and classes
Module LogBuddy::Mixin
Constants
| Name | Value |
|---|---|
| VERSION | '0.0.5' |
Public Class Methods
init (options = {})
Use LogBuddy!
# File lib/log_buddy.rb, line 22 22: def self.init(options = {}) 23: @logger = options[:default_logger] 24: mixin_to_object 25: end
mixin_to_object ()
Add the LogBuddy::Mixin to Object instance and class level.
# File lib/log_buddy.rb, line 28 28: def self.mixin_to_object 29: Object.class_eval { 30: include LogBuddy::Mixin 31: extend LogBuddy::Mixin 32: } 33: end