class Rookout::ComWs::CommandHandler
Public Class Methods
new(agent_com, augs_manager)
click to toggle source
# File lib/rookout/com_ws/command_handler.rb, line 6 def initialize agent_com, augs_manager agent_com.on "Com::Rookout::InitialAugsCommand" do |initial_augs| augs = initial_augs.augs.map { |aug_json| JSON.parse aug_json } augs_manager.initialize_augs augs end agent_com.on "Com::Rookout::AddAugCommand" do |command| augs_manager.add_aug JSON.parse(command.aug_json) end agent_com.on "Com::Rookout::RemoveAugCommand" do |command| augs_manager.remove_aug command.aug_id end end