Sha256: d236826bb4c9ee2888519dee6cb02361035083b52d9206b97ea0c8ffe8e0cd0d

Contents?: true

Size: 1.52 KB

Versions: 13

Compression:

Stored size: 1.52 KB

Contents

module GEPUB
  class Book
    # add an item(i.e. html, images, audios, etc)  to Book.
    # the added item will be referenced by the first argument in the EPUB container.
    def add_item(href, deprecated_content = nil, deprecated_id = nil, deprecated_attributes = nil, content: nil, 
                 id: nil,media_type: nil,fallback: nil,properties: nil,media_overlay: nil,toc_text: nil,
                 attributes: {})
      content, id, attributes = handle_deprecated_add_item_arguments(deprecated_content, deprecated_id, deprecated_attributes, content, id, attributes)
      add_item_internal(href, content: content, item_attributes: { id: id,media_type: media_type,fallback: fallback,properties: properties,media_overlay: media_overlay,toc_text: toc_text }, attributes: attributes, ordered: false)
    end

    # same as add_item, but the item will be added to spine of the EPUB.
    def add_ordered_item(href, deprecated_content = nil, deprecated_id = nil, deprecated_attributes = nil,  content:nil,
                         id: nil,media_type: nil,fallback: nil,properties: nil,media_overlay: nil,toc_text: nil,
                         attributes: {})
      content, id, attributes = handle_deprecated_add_item_arguments(deprecated_content, deprecated_id, deprecated_attributes, content, id, attributes)
      add_item_internal(href, content: content, item_attributes: { id: id,media_type: media_type,fallback: fallback,properties: properties,media_overlay: media_overlay,toc_text: toc_text }, attributes: attributes, ordered: true)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gepub-1.0.10 lib/gepub/book_add_item.rb
gepub-1.0.9 lib/gepub/book_add_item.rb
gepub-1.0.8 lib/gepub/book_add_item.rb
gepub-1.0.7 lib/gepub/book_add_item.rb
gepub-1.0.6 lib/gepub/book_add_item.rb
gepub-1.0.5 lib/gepub/book_add_item.rb
gepub-1.0.4 lib/gepub/book_add_item.rb
gepub-1.0.3 lib/gepub/book_add_item.rb
gepub-1.0.2 lib/gepub/book_add_item.rb
gepub-1.0.1 lib/gepub/book_add_item.rb
gepub-1.0.0 lib/gepub/book_add_item.rb
gepub-1.0.0rc1 lib/gepub/book_add_item.rb
gepub-1.0.0beta1 lib/gepub/book_add_item.rb