# File lib/cimi/model/schema.rb, line 62 def from_xml(xml, model) case @text when :nested then model[@name] = xml[@xml_name].first["content"] if xml[@xml_name] when :direct then model[@name] = xml["content"] else model[@name] = xml[@xml_name] end end
# File lib/cimi/model/schema.rb, line 60 def nested_text?; @text == :nested; end
# File lib/cimi/model/schema.rb, line 70 def to_xml(model, xml) return unless model return unless model[@name] case @text when :nested then xml[@xml_name] = [{ "content" => model[@name] }] when :direct then xml["content"] = model[@name] else xml[@xml_name] = model[@name] end end
Generated with the Darkfish Rdoc Generator 2.