Sha256: 69324a6f1e7775aaf3e31f4a7f731885a7a8493944f4c39dbf3261d8d6e71661

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true

require "stashify/file"

module Stashify
  class File
    class Local < Stashify::File
      def contents
        ::File.read(path)
      end

      def write(contents)
        ::File.write(path, contents)
      end

      def delete
        ::File.delete(path)
      end

      def exists?
        ::File.exist?(path)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stashify-3.2.0 lib/stashify/file/local.rb
stashify-3.1.0 lib/stashify/file/local.rb