Class: ZabbixManager::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/zabbix_manager/classes/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Server

初始化一个新的 Server 对象,使用 ZabbixManager 客户端,并获取 Zabbix 服务器 API 版本



8
9
10
11
# File 'lib/zabbix_manager/classes/server.rb', line 8

def initialize(client)
  @client = client
  @version = @client.api_version
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



5
6
7
# File 'lib/zabbix_manager/classes/server.rb', line 5

def version
  @version
end