class Qless::Config
A configuration class associated with a qless client
Public Class Methods
new(client)
click to toggle source
# File lib/qless/config.rb, line 8 def initialize(client) @client = client end
Public Instance Methods
[](key)
click to toggle source
# File lib/qless/config.rb, line 12 def [](key) @client.call('config.get', key) end
[]=(key, value)
click to toggle source
# File lib/qless/config.rb, line 16 def []=(key, value) @client.call('config.set', key, value) end
all()
click to toggle source
Get the specified `qless` configuration option, or if none is provided, get the complete current configuration
# File lib/qless/config.rb, line 22 def all JSON.parse(@client.call('config.get')) end
clear(option)
click to toggle source
Restore this option to the default (remove this option)
# File lib/qless/config.rb, line 27 def clear(option) @client.call('config.unset', option) end