require "karabiner/invoke_history" require "karabiner/vkopenurldef" require "karabiner/dsl/root" class Karabiner::Root include Karabiner::XmlTree include Karabiner::DSL::Root def initialize @configs = [] end def to_xml Karabiner::InvokeHistory.registered_applications.each do |application| vkopenurldef = Karabiner::Vkopenurldef.new(application) add_child(vkopenurldef) end [ "", super(1), ].join("\n") end private def add_config(config) @configs << config end end