Class: Exerb::Archive::Header
- Inherits:
-
Object
- Object
- Exerb::Archive::Header
- 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
-
#offset_of_file_table ⇒ Object
Returns the value of attribute offset_of_file_table.
-
#offset_of_name_table ⇒ Object
Returns the value of attribute offset_of_name_table.
-
#options ⇒ Object
Returns the value of attribute options.
-
#signature1 ⇒ Object
Returns the value of attribute signature1.
-
#signature2 ⇒ Object
Returns the value of attribute signature2.
Instance Method Summary collapse
-
#initialize ⇒ Header
constructor
A new instance of Header.
- #pack ⇒ Object
Constructor Details
#initialize ⇒ Header
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 = 0 @offset_of_name_table = 0 @offset_of_file_table = 0 end |
Instance Attribute Details
#offset_of_file_table ⇒ Object
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_table ⇒ Object
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 |
#options ⇒ Object
Returns the value of attribute options.
134 135 136 |
# File 'lib/exerb/archive.rb', line 134 def end |
#signature1 ⇒ Object
Returns the value of attribute signature1.
134 135 136 |
# File 'lib/exerb/archive.rb', line 134 def signature1 @signature1 end |
#signature2 ⇒ Object
Returns the value of attribute signature2.
134 135 136 |
# File 'lib/exerb/archive.rb', line 134 def signature2 @signature2 end |
Instance Method Details
#pack ⇒ Object
136 137 138 |
# File 'lib/exerb/archive.rb', line 136 def pack return [@signature1, @signature2, , @offset_of_name_table, @offset_of_file_table].pack('LLLLL') end |