lib/pmp/parser.rb in pmp-0.5.0 vs lib/pmp/parser.rb in pmp-0.5.1
- old
+ new
@@ -42,17 +42,22 @@
end
end
def parse(doc)
return if (!doc)
+ parse_href(doc['href'])
parse_version(doc['version'])
parse_attributes(doc['attributes'])
parse_links(doc['links'])
parse_items(doc['items'])
# parse_error(doc)
end
+ def parse_href(document)
+ self.href = document
+ end
+
def parse_version(document)
self.version = document || '1.0'
end
def parse_attributes(document)
@@ -63,10 +68,10 @@
def parse_links(document)
Array(document).each do |k,v|
link = parse_link(k,v)
if link
- self.links[k] = link
+ self.links_object[k] = link
end
end
end
def parse_link(name, info)