class ZBX::Entity
zabbix entity class e.g. host, group, item, graph …
Public Class Methods
new(entity, parent, &b)
click to toggle source
entitiy name, zapix object if block is given, it will be evaluated in this object so the following expression is the same
host.get(hostids: 1)
host do
get hostids: 1
end
# File lib/zbx/entity.rb, line 16 def initialize entity, parent, &b @entity = entity @parent = parent instance_eval(&b) if block_given? end
Public Instance Methods
method_missing(m, arg={})
click to toggle source
# File lib/zbx/entity.rb, line 22 def method_missing m, arg={} @parent.request "#{@entity}.#{m}", arg end