Skip to content

Instantly share code, notes, and snippets.

Created July 15, 2015 12:11
Show Gist options
  • Save anonymous/f8547d3b50db60dbadcd to your computer and use it in GitHub Desktop.
Save anonymous/f8547d3b50db60dbadcd to your computer and use it in GitHub Desktop.
call instancemethod from method of child class
class ZabbixApi
class Templates
def get_name(id)
query(
:method => "template.get",
:params => { :templateids => id }
)[0]['host']
end
end
end
zabbix = Zabbix.Api
zabbix.templates.get_name(00001) # this should call zabbix.templates.get_name which calls zabbix.querry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment