Class: Mobi::Header::ExthHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/mobi/header/exth_header.rb

Defined Under Namespace

Classes: ExthRecord

Constant Summary collapse

RECORD_TYPES =
{ 100 => :author, 101 => :publisher, 102 => :imprint, 103 => :description, 104 => :isbn, 105 => :subject,
106 => :published_at, 107 => :review, 108 => :contributor, 109 => :rights, 110 => :subject_code,
111 => :type, 112 => :source, 113 => :asin, 114 => :version }

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ExthHeader

Returns a new instance of ExthHeader.



10
11
12
13
14
15
# File 'lib/mobi/header/exth_header.rb', line 10

def initialize(data)
  @data = data
  @record_count, = @data[8, 4].unpack('N*')

  define_data_methods
end