Sha256: 51917344a89e2c58f13794da3c001e07f3c184a00d796a0e152390422e8a3da8

Contents?: true

Size: 322 Bytes

Versions: 11

Compression:

Stored size: 322 Bytes

Contents

module Keyrack
  module Store
    class Filesystem
      def initialize(options)
        @path = File.expand_path(options['path'])
      end

      def read
        File.exist?(@path) ? File.read(@path) : nil
      end

      def write(data)
        File.open(@path, 'w') { |f| f.write(data) }
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
keyrack-0.3.2 lib/keyrack/store/filesystem.rb
keyrack-0.3.1 lib/keyrack/store/filesystem.rb
keyrack-0.3.0 lib/keyrack/store/filesystem.rb
keyrack-0.3.0.pre lib/keyrack/store/filesystem.rb
keyrack-0.2.3 lib/keyrack/store/filesystem.rb
keyrack-0.2.2 lib/keyrack/store/filesystem.rb
keyrack-0.2.1 lib/keyrack/store/filesystem.rb
keyrack-0.2.0 lib/keyrack/store/filesystem.rb
keyrack-0.1.3 lib/keyrack/store/filesystem.rb
keyrack-0.1.2 lib/keyrack/store/filesystem.rb
keyrack-0.1.1 lib/keyrack/store/filesystem.rb