Class: MachO::MachOStructure Abstract
- Inherits:
-
Object
- Object
- MachO::MachOStructure
- Defined in:
- lib/macho/structure.rb
Overview
This class is abstract.
A general purpose pseudo-structure.
Direct Known Subclasses
Constant Summary collapse
- FORMAT =
The format of the data structure, in String#unpack format.
""
- SIZEOF =
The size of the data structure, in bytes.
0
Class Method Summary collapse
-
.bytesize ⇒ Fixnum
The size, in bytes, of the represented structure.
-
.new_from_bin(bin) ⇒ MachO::MachOStructure
private
A new MachOStructure initialized with
bin
.
Class Method Details
.bytesize ⇒ Fixnum
Returns the size, in bytes, of the represented structure.
12 13 14 |
# File 'lib/macho/structure.rb', line 12 def self.bytesize self::SIZEOF end |
.new_from_bin(bin) ⇒ MachO::MachOStructure
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new MachOStructure initialized with bin
.
18 19 20 |
# File 'lib/macho/structure.rb', line 18 def self.new_from_bin(bin) self.new(*bin.unpack(self::FORMAT)) end |