# File lib/cisco/telnet.rb, line 18 def run @results = [] (@cmdbuf = [] and yield self) if block_given? @cmdbuf.insert(0, *@extra_init) if @extra_init.any? @telnet = Net::Telnet.new(*@targs) login until @cmdbuf.empty? send_next @results << @telnet.waitfor(@prompt) {|x| @outblock.call(x) if @outblock} end @results end