Class: IOPromise::Dalli::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/iopromise/dalli/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#casObject (readonly)

Returns the value of attribute cas.



6
7
8
# File 'lib/iopromise/dalli/response.rb', line 6

def cas
  @cas
end

#keyObject (readonly)

Returns the value of attribute key.



6
7
8
# File 'lib/iopromise/dalli/response.rb', line 6

def key
  @key
end

#valueObject (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

Returns:

  • (Boolean)


16
17
18
# File 'lib/iopromise/dalli/response.rb', line 16

def exist?
  @exists
end

#stored?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/iopromise/dalli/response.rb', line 20

def stored?
  @stored
end