Class: LearnOpen::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/learn_open/services/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(log_path) ⇒ Logger

Returns a new instance of Logger.



5
6
7
8
# File 'lib/learn_open/services/logger.rb', line 5

def initialize(log_path)
  @log_path = log_path
  setup
end

Instance Method Details

#log(message) ⇒ Object



10
11
12
# File 'lib/learn_open/services/logger.rb', line 10

def log(message)
  File.write(log_path, message)
end