Sha256: 14765318101354098b6bcf17ca1a7ae90eca9a1e593c62a125210ae3e2869229
Contents?: true
Size: 654 Bytes
Versions: 8
Compression:
Stored size: 654 Bytes
Contents
# Encoding: utf-8 require 'json' module Qless # A configuration class associated with a qless client class Config def initialize(client) @client = client end def [](key) @client.call('config.get', key) end def []=(key, value) @client.call('config.set', key, value) end # Get the specified `qless` configuration option, or if # none is provided, get the complete current configuration def all JSON.parse(@client.call('config.get')) end # Restore this option to the default (remove this option) def clear(option) @client.call('config.unset', option) end end end
Version data entries
8 entries across 8 versions & 1 rubygems