Class: Exerb::Archive::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/exerb/archive.rb

Overview

#

Constant Summary collapse

SIGNATURE1 =
0x52455845
SIGNATURE2 =
0x04000042
OPTIONS_KCODE_NONE =
0
OPTIONS_KCODE_EUC =
1
OPTIONS_KCODE_SJIS =
2
OPTIONS_KCODE_UTF8 =
3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHeader

Returns a new instance of Header


126
127
128
129
130
131
132
# File 'lib/exerb/archive.rb', line 126

def initialize
  @signature1           = 0
  @signature2           = 0
  @options              = 0
  @offset_of_name_table = 0
  @offset_of_file_table = 0
end

Instance Attribute Details

#offset_of_file_tableObject

Returns the value of attribute offset_of_file_table


134
135
136
# File 'lib/exerb/archive.rb', line 134

def offset_of_file_table
  @offset_of_file_table
end

#offset_of_name_tableObject

Returns the value of attribute offset_of_name_table


134
135
136
# File 'lib/exerb/archive.rb', line 134

def offset_of_name_table
  @offset_of_name_table
end

#optionsObject

Returns the value of attribute options


134
135
136
# File 'lib/exerb/archive.rb', line 134

def options
  @options
end

#signature1Object

Returns the value of attribute signature1


134
135
136
# File 'lib/exerb/archive.rb', line 134

def signature1
  @signature1
end

#signature2Object

Returns the value of attribute signature2


134
135
136
# File 'lib/exerb/archive.rb', line 134

def signature2
  @signature2
end

Instance Method Details

#packObject


136
137
138
# File 'lib/exerb/archive.rb', line 136

def pack
  return [@signature1, @signature2, @options, @offset_of_name_table, @offset_of_file_table].pack('LLLLL')
end