lib/zabbixapi/items.rb in zabbixapi-0.4.2 vs lib/zabbixapi/items.rb in zabbixapi-0.4.3

- old
+ new

@@ -59,12 +59,10 @@ end def get_id(data) result = get_full_data(data) itemid = nil - result.each do |item| - itemid = item['itemid'].to_i if item['name'] == data[:name] - end + result.each { |item| itemid = item['itemid'].to_i if item['name'] == data[:name] } itemid end def create_or_update(data) itemid = get_id(:description => data[:description])