Module: HTM::MCP::GroupSession

Defined in:
lib/htm/mcp/group_tools.rb

Overview

Session state for robot groups

Class Method Summary collapse

Class Method Details

.get_group(name) ⇒ Object



14
15
16
# File 'lib/htm/mcp/group_tools.rb', line 14

def get_group(name)
  groups[name]
end

.group_namesObject



27
28
29
# File 'lib/htm/mcp/group_tools.rb', line 27

def group_names
  groups.keys
end

.groupsObject



10
11
12
# File 'lib/htm/mcp/group_tools.rb', line 10

def groups
  @groups ||= {}
end

.remove_group(name) ⇒ Object



22
23
24
25
# File 'lib/htm/mcp/group_tools.rb', line 22

def remove_group(name)
  group = groups.delete(name)
  group&.shutdown
end

.set_group(name, group) ⇒ Object



18
19
20
# File 'lib/htm/mcp/group_tools.rb', line 18

def set_group(name, group)
  groups[name] = group
end