# File lib/net/sftp/protocol/01/attributes.rb, line 275 def to_s prepare_serialization! flags = 0 self.class.elements.each do |name, type, condition| flags |= condition if attributes[name] end buffer = Net::SSH::Buffer.from(:long, flags) self.class.elements.each do |name, type, condition| if flags & condition == condition if type == :special send("encode_#{name}", buffer) else buffer.send("write_#{type}", attributes[name]) end end end buffer.to_s end