Class: Cabriolet::Models::LITHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/cabriolet/models/lit_header.rb

Overview

Represents the header of a Microsoft Reader LIT file

LIT files are Microsoft Reader eBook files that use LZX compression and may use DES encryption for DRM-protected content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLITHeader

Returns a new instance of LITHeader.



12
13
14
15
16
17
18
# File 'lib/cabriolet/models/lit_header.rb', line 12

def initialize
  @version = 0
  @filename = ""
  @length = 0
  @encrypted = false
  @files = []
end

Instance Attribute Details

#encryptedObject

Returns the value of attribute encrypted.



10
11
12
# File 'lib/cabriolet/models/lit_header.rb', line 10

def encrypted
  @encrypted
end

#filenameObject

Returns the value of attribute filename.



10
11
12
# File 'lib/cabriolet/models/lit_header.rb', line 10

def filename
  @filename
end

#filesObject

Returns the value of attribute files.



10
11
12
# File 'lib/cabriolet/models/lit_header.rb', line 10

def files
  @files
end

#lengthObject

Returns the value of attribute length.



10
11
12
# File 'lib/cabriolet/models/lit_header.rb', line 10

def length
  @length
end

#versionObject

Returns the value of attribute version.



10
11
12
# File 'lib/cabriolet/models/lit_header.rb', line 10

def version
  @version
end

Instance Method Details

#encrypted?Boolean

Check if the LIT file is encrypted

Returns:

  • (Boolean)

    true if the file uses DES encryption



23
24
25
# File 'lib/cabriolet/models/lit_header.rb', line 23

def encrypted?
  @encrypted
end