Sha256: 391ad7b3dea86e870746a5d806c6957740f4c65daf92f84b8a56760d11e1f1bb

Contents?: true

Size: 309 Bytes

Versions: 6

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

require "stashify/file"

module Stashify
  class File
    class Local < Stashify::File
      def initialize(path)
        @path = path
        super(name: ::File.basename(path), contents: nil)
      end

      def contents
        ::File.read(@path)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stashify-1.0.5 lib/stashify/file/local.rb
stashify-1.0.4 lib/stashify/file/local.rb
stashify-1.0.3 lib/stashify/file/local.rb
stashify-1.0.2 lib/stashify/file/local.rb
stashify-1.0.1 lib/stashify/file/local.rb
stashify-1.0 lib/stashify/file/local.rb