Class: IOPromise::Dalli::Response
- Inherits:
-
Object
- Object
- IOPromise::Dalli::Response
- Defined in:
- lib/iopromise/dalli/response.rb
Instance Attribute Summary collapse
-
#cas ⇒ Object
readonly
Returns the value of attribute cas.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #exist? ⇒ Boolean
-
#initialize(key:, value:, exists: false, stored: false, cas: nil) ⇒ Response
constructor
A new instance of Response.
- #stored? ⇒ Boolean
Constructor Details
#initialize(key:, value:, exists: false, stored: false, cas: nil) ⇒ Response
Returns a new instance of Response.
8 9 10 11 12 13 14 |
# File 'lib/iopromise/dalli/response.rb', line 8 def initialize(key:, value:, exists: false, stored: false, cas: nil) @key = key @value = value @exists = exists @stored = stored @cas = cas end |
Instance Attribute Details
#cas ⇒ Object (readonly)
Returns the value of attribute cas.
6 7 8 |
# File 'lib/iopromise/dalli/response.rb', line 6 def cas @cas end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/iopromise/dalli/response.rb', line 6 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/iopromise/dalli/response.rb', line 6 def value @value end |
Instance Method Details
#exist? ⇒ Boolean
16 17 18 |
# File 'lib/iopromise/dalli/response.rb', line 16 def exist? @exists end |
#stored? ⇒ Boolean
20 21 22 |
# File 'lib/iopromise/dalli/response.rb', line 20 def stored? @stored end |