Module: PacketGen::Types::ArrayOfIntMixin

Included in:
ArrayOfInt16, ArrayOfInt16le, ArrayOfInt32, ArrayOfInt32le, ArrayOfInt8
Defined in:
lib/packetgen/types/array.rb

Instance Method Summary collapse

Instance Method Details

#read_from_array(ary) ⇒ Object



248
249
250
251
252
253
254
# File 'lib/packetgen/types/array.rb', line 248

def read_from_array(ary)
  return self if ary.empty?

  ary.each do |i|
    self << self.class.set_of_klass.new(i)
  end
end