Class: LiveResource::RemoteMethodToken

Inherits:
Object
  • Object
show all
Defined in:
lib/live_resource/methods/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(redis_class, redis_name, seq) ⇒ RemoteMethodToken

Returns a new instance of RemoteMethodToken.



7
8
9
10
11
# File 'lib/live_resource/methods/token.rb', line 7

def initialize(redis_class, redis_name, seq)
  @redis_class = redis_class
  @redis_name = redis_name
  @seq = seq
end

Instance Attribute Details

#redis_classObject (readonly)

Returns the value of attribute redis_class.



5
6
7
# File 'lib/live_resource/methods/token.rb', line 5

def redis_class
  @redis_class
end

#redis_nameObject (readonly)

Returns the value of attribute redis_name.



5
6
7
# File 'lib/live_resource/methods/token.rb', line 5

def redis_name
  @redis_name
end

#seqObject (readonly)

Returns the value of attribute seq.



5
6
7
# File 'lib/live_resource/methods/token.rb', line 5

def seq
  @seq
end

Instance Method Details

#encode_with(coder) ⇒ Object



13
14
15
# File 'lib/live_resource/methods/token.rb', line 13

def encode_with coder
  coder.represent_scalar '!live_resource:token', "#{@redis_class}.#{@redis_name}.#{@seq}"
end