Method: Atom::Xml::Parseable::ParseSpec#parse
- Defined in:
- lib/atom/xml/parser.rb
#parse(target, xml) ⇒ Object
Parses a chunk of XML according the specification. The data extracted will be assigned to the target object.
270 271 272 273 274 275 276 277 |
# File 'lib/atom/xml/parser.rb', line 270 def parse(target, xml) case [:type] when :single target.send("#{@attribute}=".to_sym, build(target, xml)) when :collection target.send("#{@attribute}") << build(target, xml) end end |