Class: BinStruct::ArrayOfInt8

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

Overview

Specialized Array to handle serie of Int8.

Examples:

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

ary.read("\x05\x06")
ary.map(&:to_i) #=> [5, 6]

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