Class: Bone::API::Redis::Key
- Inherits:
-
Object
- Object
- Bone::API::Redis::Key
- Includes:
- Familia
- Defined in:
- lib/bone/api.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #index ⇒ Object
-
#initialize(token, name, bucket = :global) ⇒ Key
constructor
A new instance of Key.
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
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
371 372 373 |
# File 'lib/bone/api.rb', line 371 def bucket @bucket end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
371 372 373 |
# File 'lib/bone/api.rb', line 371 def name @name end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
371 372 373 |
# File 'lib/bone/api.rb', line 371 def token @token end |
Instance Method Details
#index ⇒ Object
376 377 378 |
# File 'lib/bone/api.rb', line 376 def index [token, bucket, name].join ':' end |