Sha256: 588b9a10759d1dc0fcac9261bbd96c1e8e2242d7b84767c16187d54637b39c29
Contents?: true
Size: 556 Bytes
Versions: 2
Compression:
Stored size: 556 Bytes
Contents
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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solara-0.2.0 | solara/lib/core/scripts/strings_xml_manager.rb |
solara-0.1.0 | solara/lib/core/scripts/strings_xml_manager.rb |