Class: Momento::GetResponse

Inherits:
Response show all
Defined in:
lib/momento/response/get_response.rb

Overview

A response containing the value retrieved from a cache.

Instance Method Summary collapse

Methods inherited from Response

#error, #error?

Instance Method Details

#hit?Boolean

There was a value for the key.

Returns:

  • (Boolean)


9
10
11
# File 'lib/momento/response/get_response.rb', line 9

def hit?
  false
end

#miss?Boolean

There was no value for the key.

Returns:

  • (Boolean)


15
16
17
# File 'lib/momento/response/get_response.rb', line 15

def miss?
  false
end

#to_sString

Displays the response and the value, if any. A long value will be truncated.

Returns:

  • (String)


# File 'lib/momento/response/get_response.rb', line 33

#value_bytesString?

The gotten value, if any, as binary data: an ASCII_8BIT encoded frozen String.

Returns:

  • (String, nil)

    the value, if any, frozen and ASCII_8BIT encoded



22
23
24
# File 'lib/momento/response/get_response.rb', line 22

def value_bytes
  nil
end

#value_stringString?

The gotten value, if any, as a UTF-8 string.

Returns:

  • (String, nil)

    the value, if any.



29
30
31
# File 'lib/momento/response/get_response.rb', line 29

def value_string
  nil
end