Sha256: 4148c341f9934ccd78d0f0354b9d6c3b081c93ab6a72bcc36debd2775d8dcb30

Contents?: true

Size: 337 Bytes

Versions: 7

Compression:

Stored size: 337 Bytes

Contents

module LearnOpen
  class Logger
    attr_reader :log_path

    def initialize(log_path)
      @log_path = log_path
      setup
    end

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

    private

    attr_reader :log_path

    def setup
      FileUtils.touch(log_path)
      File.write(log_path, '')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
learn-open-1.2.28 lib/learn_open/services/logger.rb
learn-open-1.2.27 lib/learn_open/services/logger.rb
learn-open-1.2.26 lib/learn_open/services/logger.rb
learn-open-1.2.24 lib/learn_open/services/logger.rb
learn-open-1.2.23 lib/learn_open/services/logger.rb
learn-open-1.2.22 lib/learn_open/services/logger.rb
learn-open-1.2.21 lib/learn_open/services/logger.rb