Created
July 15, 2015 12:11
-
-
Save anonymous/f8547d3b50db60dbadcd to your computer and use it in GitHub Desktop.
call instancemethod from method of child class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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