# File lib/rubytorrent/typedstruct.rb, line 126 def to_bencoding @required.each { |f, reqd| raise ArgumentError, "missing required parameter #{f}" if reqd && self.send(f).nil? } @field.extend(HashMapHash).map_hash { |f, type| [@label[f], self.send(f)] }.to_bencoding end