Sha256: 99ff7c20714cb03ddc1927c65e1b8789cbdb1f386f0f89104a16d9a2bf476d64

Contents?: true

Size: 289 Bytes

Versions: 2

Compression:

Stored size: 289 Bytes

Contents

class Logger
  def initialize(options={})
    @homedir = options[:homedir] ||= "log"
    FileUtils.mkdir @homedir unless Dir[@homedir].present?
    FileUtils.touch "#{@homedir}/ferry.log"
  end

  def write(msg)
    log = File.open("#{@homedir}/ferry.log", 'w')
    log.puts msg
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ferry-0.0.2 lib/ferry/logger.rb
ferry-0.0.1 lib/ferry/logger.rb