Class: Zabbix::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/zabbix/client/version.rb,
lib/zabbix/client/client.rb

Defined Under Namespace

Classes: Error, Method

Constant Summary collapse

VERSION =
'0.0.3'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options = {}) ⇒ Client

Returns a new instance of Client.



113
114
115
116
# File 'lib/zabbix/client/client.rb', line 113

def initialize(url, options = {})
  @url = URI.parse(url)
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



118
119
120
# File 'lib/zabbix/client/client.rb', line 118

def method_missing(method_name)
  Zabbix::Client::Method.new(method_name, self)
end

Instance Attribute Details

#authObject

Returns the value of attribute auth.



111
112
113
# File 'lib/zabbix/client/client.rb', line 111

def auth
  @auth
end

#optionsObject (readonly)

Returns the value of attribute options.



110
111
112
# File 'lib/zabbix/client/client.rb', line 110

def options
  @options
end

#urlObject (readonly)

Method



109
110
111
# File 'lib/zabbix/client/client.rb', line 109

def url
  @url
end