class TranslateYamlGenerator::Writer::HashWriter
Public Instance Methods
handle_record(ns, record)
click to toggle source
# File lib/translate_yaml_generator/writer.rb, line 54 def handle_record(ns, record) token_list = ns.split(".") curr_hash = @root token_list.each do |token| if curr_hash.has_key? token curr_hash = curr_hash[token] else curr_hash[token] = {} curr_hash = curr_hash[token] end end curr_hash[record.name] = record.item @locale_idx end
reset()
click to toggle source
# File lib/translate_yaml_generator/writer.rb, line 51 def reset; @root = {}; end
result()
click to toggle source
# File lib/translate_yaml_generator/writer.rb, line 52 def result; @root; end