Class: BinStruct::ArrayOfInt32

Inherits:
Array
  • Object
show all
Includes:
ArrayOfIntMixin
Defined in:
lib/bin_struct/array.rb

Overview

Specialized Array to handle serie of Int32.

Examples:

ary = BinStruct::ArrayOfInt32.new
ary.read([0, 1, 2])
ary.to_s #=> "\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02".b

ary.read("\x00\x00\x05\x06")
ary.map(&:to_i) #=> [0x00000506]

Constant Summary

Constants inherited from Array

BinStruct::Array::HUMAN_SEPARATOR

Constants included from LengthFrom

LengthFrom::MAX_SZ_TO_READ

Method Summary

Methods included from ArrayOfIntMixin

#read_from_array

Methods inherited from Array

#<<, #==, #[], #clear, #clear!, #delete, #delete_at, #each, #empty?, #first, #initialize, #initialize_copy, #last, #push, #read, set_of, set_of_klass, #size, #sz, #to_a, #to_human, #to_s

Methods included from LengthFrom

#initialize_length_from, #read_with_length_from, #sz_to_read

Methods included from Structable

#format_inspect, #read, #sz, #to_human, #to_s, #type_name

Constructor Details

This class inherits a constructor from BinStruct::Array