Class: GitHooks::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/git_hooks/logger.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



19
20
21
# File 'lib/git_hooks/logger.rb', line 19

def initialize
  @logger = ::Logger.new("/tmp/git_hooks.log")
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



17
18
19
# File 'lib/git_hooks/logger.rb', line 17

def logger
  @logger
end

Class Method Details

.method_missing(meth, *args, &blk) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/git_hooks/logger.rb', line 8

def method_missing(meth, *args, &blk)
  if instance.logger.respond_to? meth
    instance.logger.send(meth, *args)
  else
    super
  end
end