Module: ZPNG::ReadableStruct::InstanceMethods

Defined in:
lib/zpng/readable_struct.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/zpng/readable_struct.rb', line 50

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

#packObject



46
47
48
# File 'lib/zpng/readable_struct.rb', line 46

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