- if options[:role].nil? || interface[:role].to_s == options[:role].to_s
- if options[:family].nil? || interface[:family].to_s == options[:family].to_s
- if block.nil?
- interfaces << interface
- else
- block.call(interface)
- end
- end
+ next unless options[:role].nil? || interface[:role].to_s == options[:role].to_s
+ next unless options[:family].nil? || interface[:family].to_s == options[:family].to_s
+
+ if block.nil?
+ interfaces << interface
+ else
+ yield interface