Class: Ronin::Support::Binary::CTypes::ObjectType Private
- Defined in:
- lib/ronin/support/binary/ctypes/object_type.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a object type that is memory mapped.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#size ⇒ Integer
readonly
private
The size, in bytes, of the memory-mapped type.
Attributes inherited from Type
Instance Method Summary collapse
-
#initialize(size) ⇒ ObjectType
constructor
private
Initializes the memory-mapped type.
Methods inherited from Type
#[], #align, #alignment, #dequeue_value, #enqueue_value, #pack, #uninitialized_value, #unpack
Constructor Details
#initialize(size) ⇒ ObjectType
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.
Initializes the memory-mapped type.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ronin/support/binary/ctypes/object_type.rb', line 45 def initialize(size) @size = size super( pack_string: if size.finite? "a#{@size}" else 'a*' end ) end |
Instance Attribute Details
#size ⇒ Integer (readonly)
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.
The size, in bytes, of the memory-mapped type.
37 38 39 |
# File 'lib/ronin/support/binary/ctypes/object_type.rb', line 37 def size @size end |