module Yell::Loggable
Include this module to add a logger to any class.
When including this module, your class will have a :logger instance method available. Before you can use it, you will need to define a Yell logger and provide it with the name of your class.
@example
Yell.new :stdout, name: 'Foo' class Foo include Yell::Loggable end Foo.new.logger.info "Hello World"
Public Class Methods
included(base)
click to toggle source
# File lib/yell/loggable.rb, line 17 def self.included(base) base.extend(ClassMethods) end
Public Instance Methods
logger()
click to toggle source
# File lib/yell/loggable.rb, line 27 def logger self.class.logger end