Sha256: ebc2620d1a68ad15908325971936367bf83813826ced4b4c2ff563eb9b0e3c2a

Contents?: true

Size: 277 Bytes

Versions: 1

Compression:

Stored size: 277 Bytes

Contents

module Whenever
  class Log
    attr_reader :kind

    def initialize kind, path
      @kind = kind
      @path = path
    end

    def name
      "#{@kind}_log"
    end

    def tail
      File.read(@path)
    end

    def clear
      File.write(@path, nil)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whenever-web-0.0.5 app/models/whenever/log.rb