Sha256: 9f91764b9e8ef8d1967b10a1955bc1dd81a5c4582c552dc96bf42cc8b72c0cf1
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 Bytes
Contents
# frozen_string_literal: true require "yaml" module Trellodon class Journal FILENAME = "journal.yml" def initialize(dir) @location = File.join(dir, FILENAME) File.write(location, "") unless File.exist?(location) end def <<(record) File.write(location, record.to_yaml, mode: "a+") end private attr_reader :location end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trellodon-0.4.0 | lib/trellodon/journal.rb |