add logger also as class method when included

This commit is contained in:
Benjamin Neff 2016-05-29 02:44:33 +02:00
parent a5e1d8aa90
commit 72ea858e25

View file

@ -3,6 +3,12 @@ module DiasporaFederation
#
# it uses the logging-gem if available
module Logging
# add +logger+ also as class method when included
# @param [Class] klass the class into which the module is included
def self.included(klass)
klass.extend(self)
end
private
# get the logger for this class