lib/eader/document.rb in eader-0.0.3 vs lib/eader/document.rb in eader-0.0.4
- old
+ new
@@ -10,29 +10,29 @@
end
def series
doc.css('dsc c01').map do |c|
if c['level'] == 'series'
- Item.new(c.css('did'))
+ Item.new(c)
end
end.compact
end
def subseries
doc.css('dsc c02').map do |c|
if c['level'] == 'subseries'
- Item.new(c.css('did'))
+ Item.new(c)
end
end.compact
end
def items
@items ||= []
(1..3).each do |n|
doc.css("dsc c0#{n}").map do |c|
if c['level'] == 'item'
- @items << Item.new(c.css('did'))
+ @items << Item.new(c)
end
end
end
@items.compact