lib/gepub/resource_builder.rb in gepub-0.6.5.2 vs lib/gepub/resource_builder.rb in gepub-0.6.6

- old
+ new

@@ -69,10 +69,22 @@ |k,p| p.call } end + def page_spread_left + itemref = @book.spine.itemref_by_id[@last_defined_item.item.id] + raise 'page_spread_left should be called inside ordered' if (itemref.nil?) + itemref.page_spread_left + end + + def page_spread_right + itemref = @book.spine.itemref_by_id[@last_defined_item.item.id] + raise 'page_spread_right should be called inside ordered' if (itemref.nil?) + itemref.page_spread_right + end + def glob(arg) files(*Dir.glob(arg)) end def import(conf, args = {}) @@ -138,10 +150,14 @@ item1.item.set_fallback(item2.item.id) end item2 } end - + + def handles(media_type) + @last_defined_item.is_handler_of(media_type) + end + private def create_one_file(val) name = val io = val if (String === val && !val.start_with?('http'))