class Siberite::Client::Envelope

Attributes

envelope_class[RW]

Public Class Methods

new(envelope_class, client) click to toggle source
Calls superclass method
# File lib/siberite/client/envelope.rb, line 6
def initialize(envelope_class, client)
  @envelope_class = envelope_class
  super(client)
end

Public Instance Methods

get(*args) click to toggle source
# File lib/siberite/client/envelope.rb, line 11
def get(*args)
  response = client.get(*args)
  if response.respond_to?(:unwrap)
    response.unwrap
  else
    response
  end
end
set(key, value, *args) click to toggle source
# File lib/siberite/client/envelope.rb, line 20
def set(key, value, *args)
  client.set(key, envelope_class.new(value), *args)
end