require 'rexml/document' class StringsXmlManager def initialize(file_path) @file_path = file_path @xml_content = File.read(@file_path) @doc = REXML::Document.new(@xml_content) end def delete_app_name app_name_element = @doc.elements['resources/string[@name="app_name"]'] app_name_element.remove if app_name_element save_changes Solara.logger.debug("Removed app_name from #{@file_path} to avoid duplication with artifacts/strings.xml.") end private def save_changes File.write(@file_path, @doc.to_s) end end