Module: Thepub::Epub::ContainerItem

Included in:
Item, NCX, OPF
Defined in:
lib/thepub/epub/container_item.rb

Overview

Mixin for stuff that can be added to the ePub package

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#file_pathObject

Returns the value of attribute file_path.



9
10
11
# File 'lib/thepub/epub/container_item.rb', line 9

def file_path
  @file_path
end

#media_typeObject

Returns the value of attribute media_type.



10
11
12
# File 'lib/thepub/epub/container_item.rb', line 10

def media_type
  @media_type
end

Instance Method Details

#document?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/thepub/epub/container_item.rb', line 12

def document?
  ['application/xhtml+xml', 'application/x-dtbook+xml'].include? self.media_type
end