Module: IOStruct::InstanceMethods

Defined in:
lib/iostruct.rb

Overview

ClassMethods

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/iostruct.rb', line 48

def empty?
  to_a.all?{ |t| t == 0 || t.nil? || t.to_s.tr("\x00","").empty? }
end

#packObject



44
45
46
# File 'lib/iostruct.rb', line 44

def pack
  to_a.pack self.class.const_get('FORMAT')
end