# File lib/genomed.rb, line 88 def create if input.wizard puts "You're using the wizard!" puts input.inspect elsif input.yaml node_dir = File.join(BASE_NODE_DIR, input.node_name) persist_node(input.node_name, input.yaml) elsif input.xml xml = XmlSimple.xml_in(input.xml) params = Hash.new xml["parameters"].each do |p| p.each_key do |k| params[k] = p[k].to_s #The value is an array. Yay. end end persist_node(xml["name"].to_s, YAML.dump({"classes" => xml["class"], "parameters" => params})) end redirect R(Nodes) if @format == :HTML end