Sha256: c18b98d96a50d3c2a1a98c7184d63b292684c398542bb48bad4a7851ca0b86bb

Contents?: true

Size: 330 Bytes

Versions: 10

Compression:

Stored size: 330 Bytes

Contents

module Copy
  module Storage
    class Redis
      def initialize(connection_url)
        @redis = ::Redis.new(connection_url)
      end
      
      def get(name)
        @redis.hget("copy:content", name)
      end
      
      def set(name, content)
        @redis.hset("copy:content", name, content)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
copy_no_dependency-0.2.0 lib/copy/storage/redis.rb
copy-0.2.0 lib/copy/storage/redis.rb
copy-0.1.7 lib/copy/storage/redis.rb
copy-0.1.6 lib/copy/storage/redis.rb
copy-0.1.5 lib/copy/storage/redis.rb
copy-0.1.4 lib/copy/storage/redis.rb
copy-0.1.3 lib/copy/storage/redis.rb
copy-0.1.2 lib/copy/storage/redis.rb
copy-0.1.1 lib/copy/storage/redis.rb
copy-0.1.0 lib/copy/storage/redis.rb