lib/indexer/importer/html.rb in indexer-0.1.0 vs lib/indexer/importer/html.rb in indexer-0.2.0
- old
+ new
@@ -151,9 +151,14 @@
if n = node.at_css('.version')
entry['version'] = n.content.strip
end
+ # TODO: better approach to optional field?
+ if n = node.at_css('.optional')
+ entry['optional'] = true #n.content.strip != "false"
+ end
+
if n = (node.at_css('.groups') || node.at_css('.group'))
text = n.content.strip
text = text.sub(/^[(]/, '').sub(/[)]$/, '').strip
entry['groups'] = text.split(/\s+/)