Class: Bone::API::Redis::Key

Inherits:
Object
  • Object
show all
Includes:
Familia
Defined in:
lib/bone/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, name, bucket = :global) ⇒ Key

Returns a new instance of Key.



372
373
374
375
# File 'lib/bone/api.rb', line 372

def initialize(token, name, bucket=:global)
  @token, @name, @bucket = token.to_s, name.to_s, bucket.to_s
  initialize_redis_objects
end

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



371
372
373
# File 'lib/bone/api.rb', line 371

def bucket
  @bucket
end

#nameObject (readonly)

Returns the value of attribute name.



371
372
373
# File 'lib/bone/api.rb', line 371

def name
  @name
end

#tokenObject (readonly)

Returns the value of attribute token.



371
372
373
# File 'lib/bone/api.rb', line 371

def token
  @token
end

Instance Method Details

#indexObject



376
377
378
# File 'lib/bone/api.rb', line 376

def index
  [token, bucket, name].join ':'
end