Class: OpenC3::ToolConfigModel

Inherits:
Object
  • Object
show all
Defined in:
lib/openc3/models/tool_config_model.rb

Class Method Summary collapse

Class Method Details

.delete_config(tool, name, scope: $openc3_scope) ⇒ Object



37
38
39
# File 'lib/openc3/models/tool_config_model.rb', line 37

def self.delete_config(tool, name, scope: $openc3_scope)
  Store.hdel("#{scope}__config__#{tool}", name)
end

.list_configs(tool, scope: $openc3_scope) ⇒ Object



25
26
27
# File 'lib/openc3/models/tool_config_model.rb', line 25

def self.list_configs(tool, scope: $openc3_scope)
  Store.hkeys("#{scope}__config__#{tool}")
end

.load_config(tool, name, scope: $openc3_scope) ⇒ Object



29
30
31
# File 'lib/openc3/models/tool_config_model.rb', line 29

def self.load_config(tool, name, scope: $openc3_scope)
  Store.hget("#{scope}__config__#{tool}", name)
end

.save_config(tool, name, data, scope: $openc3_scope) ⇒ Object



33
34
35
# File 'lib/openc3/models/tool_config_model.rb', line 33

def self.save_config(tool, name, data, scope: $openc3_scope)
  Store.hset("#{scope}__config__#{tool}", name, data)
end