Sha256: b80d3e57257643e64fe3ed9c152d7c50832fa2362f87daa3d75e0bee7d1af9a4
Contents?: true
Size: 513 Bytes
Versions: 9
Compression:
Stored size: 513 Bytes
Contents
class Ip2ProxyRecord def self.init(database, ip_version) cls = Class.new(BinData::Record) cls.class_eval { endian :little i2p_ip_data :ip_from, :ip_version => ip_version database.each do |col| if col.first == :country i2p_string_data :country_short i2p_string_data :country_long, :country_long => true else i2p_string_data col.first end end i2p_ip_data :ip_to, :ip_version => ip_version } cls end end
Version data entries
9 entries across 9 versions & 1 rubygems