A base class for objects representing a C structure
accessor to Fiddle::CStructEntity
# File fiddle/lib/fiddle/struct.rb, line 11 def CStruct.entity_class CStructEntity end
# File fiddle/lib/fiddle/struct.rb, line 67 def each return enum_for(__function__) unless block_given? self.class.members.each do |name,| yield(self[name]) end end
# File fiddle/lib/fiddle/struct.rb, line 75 def each_pair return enum_for(__function__) unless block_given? self.class.members.each do |name,| yield(name, self[name]) end end
# File fiddle/lib/fiddle/struct.rb, line 91 def replace(another) if another.nil? self.class.members.each do |name,| self[name] = nil end elsif another.respond_to?(:each_pair) another.each_pair do |name, value| self[name] = value end else another.each do |name, value| self[name] = value end end self end