class TranslateYamlGenerator::Reader::BaseReader

Public Instance Methods

build_tree(records) click to toggle source
# File lib/translate_yaml_generator/reader.rb, line 9
def build_tree(records)
  root = TranslateYamlGenerator::Node.new
  records.each do |r|
  node = root.find_child! r.namespace
    node << r
  end
  root
end
read(filename) click to toggle source
# File lib/translate_yaml_generator/reader.rb, line 18
def read(filename)
  check_filename(filename)
  records = read_records filename
  root = build_tree records
end