class EPUB::Publication::Package
Constants
- CONTENT_MODELS
- Metadata
- RESERVED_VOCABULARY_PREFIXES
Attributes
Public Class Methods
Source
# File lib/epub/publication/package.rb, line 18 def define_content_model(model_name) define_method "#{model_name}=" do |model| current_model = __send__(model_name) current_model.package = nil if current_model model.package = self instance_variable_set "@#{model_name}", model end end
Public Instance Methods
Source
# File lib/epub/publication/package.rb, line 55 def full_path rootfile.full_path if rootfile end
Full path in EPUB
archive @return [Addressable::URI]
Source
# File lib/epub/publication/package.rb, line 59 def inspect "#<%{class}:%{object_id} %{attributes} %{models}>" % { :class => self.class, :object_id => inspect_object_id, :attributes => inspect_instance_variables(exclude: CONTENT_MODELS.map {|model| :"@#{model}"}), :models => inspect_models } end
Source
# File lib/epub/publication/package.rb, line 68 def inspect_models CONTENT_MODELS.map {|name| model = __send__(name) representation = model.nil? ? model.inspect : model.inspect_simply "@#{name}=#{representation}" }.join(' ') end
Source
# File lib/epub/publication/package.rb, line 49 def rootfile @book.ocf.container.rootfiles.find {|rf| rf.package == self} end
Corresponding {Rootfile} @return [OCF::Container::Rootfile]
Source
# File lib/epub/publication/package.rb, line 43 def unique_identifier @metadata.unique_identifier end
@return [EPUB::Metadata::Identifier] Unique Identifier