class Babelish::Android2CSV
Public Class Methods
new(args = {:filenames => []})
click to toggle source
Calls superclass method
# File lib/babelish/android2csv.rb, line 5 def initialize(args = {:filenames => []}) super(args) end
Public Instance Methods
load_strings(strings_filename)
click to toggle source
# File lib/babelish/android2csv.rb, line 9 def load_strings(strings_filename) strings = {} xml_file = File.open(strings_filename) parser = Nokogiri::XML(xml_file) do |config| config.strict.noent end parser.xpath("//string").each do |node| if !node.nil? && !node["name"].nil? strings.merge!(node["name"] => node.inner_html) end end xml_file.close [strings, {}] end