class Jylis::DataType::MVREG

A multi-value register.

@see jemc.github.io/jylis/docs/types/mvreg/

Public Instance Methods

get(key) click to toggle source

Get the latest value(s) for the register at `key`.

# File lib/jylis-rb/data_types/mvreg.rb, line 9
def get(key)
  connection.query("MVREG", "GET", key)
end
set(key, value) click to toggle source

Set the latest `value` for the register at `key`.

# File lib/jylis-rb/data_types/mvreg.rb, line 14
def set(key, value)
  result = connection.query("MVREG", "SET", key, value)

  unless result == "OK"
    raise "Failed: MVREG SET #{key} #{value}"
  end
end