Sha256: 19a29bd870fd67b7d0e99a6ccf6788398482eb25da5213774b3f81464abc7890
Contents?: true
Size: 465 Bytes
Versions: 13
Compression:
Stored size: 465 Bytes
Contents
module BigBrother class StatusFile def initialize(*filenames) @path = File.join(BigBrother.config_dir, *[filenames.map(&:to_s)]) end def content File.read(@path).chomp end def create(reason) FileUtils.mkdir_p(File.dirname(@path)) File.open(@path, 'w') do |file| file.puts(reason) end end def delete FileUtils.rm(@path) end def exists? File.exists?(@path) end end end
Version data entries
13 entries across 13 versions & 1 rubygems