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



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

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

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



22
23
24
# File 'lib/openc3/models/tool_config_model.rb', line 22

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

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



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

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



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

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