For some reason the get_mac_by_printer(host_name) method isn’t working.
All the other bits work, but I have a feeling that I’m running into a
problem with variables defined within blocks, but I’m at a loss as to
how to negotiate it. The resulting mac is returning as nilClass and it
definitely isn’t nil! Code as follows:
#Class for handling the plist file.
servers=@plist_hash[‘servers’].each do |s|
mac=s[‘mac’] if s[‘name’]==host_name
printers.each do |v|
host=v[‘host’] if v[‘name’]==printer_name
Thanks for your help,