60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/backburner/connection.rb', line 60
def send_text command_data, data=nil
request = "#{command_data}"
request_hash = {}
if data
request_hash['Match'] = STATUS_REGEXP
request += " #{data.bytesize+14}"
end
request_hash['String'] = request
@last_response = @session.cmd request_hash
parse_status
@last_response = @session.puts data
@last_response = @session.waitfor('Match' => STATUS_REGEXP)
@session.waitfor 'Match' => PROMPT_REGEXP
parse_status
end
|