2022-11-05 16:48:47 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-10-30 09:13:18 +00:00
|
|
|
class ServerInfo
|
|
|
|
attr_reader :version, :name, :map, :gametype
|
|
|
|
|
|
|
|
def initialize(infos)
|
|
|
|
@version = infos[0]
|
|
|
|
@name = infos[1]
|
|
|
|
@map = infos[2]
|
|
|
|
@gametype = infos[3]
|
|
|
|
end
|
|
|
|
|
|
|
|
def to_s
|
|
|
|
"version=#{@version} gametype=#{gametype} map=#{map} name=#{name}"
|
|
|
|
end
|
|
|
|
end
|