Method: Avaya::TFTP#initialize
- Defined in:
- lib/avaya/tftp.rb
#initialize(file) ⇒ TFTP
Returns a new instance of TFTP.
7 8 9 10 11 12 13 |
# File 'lib/avaya/tftp.rb', line 7 def initialize (file) tftp = Net::TFTP.new(Avaya::Configuration.host) temp_file = Tempfile.new(random_file) tftp.getbinaryfile(file, temp_file) @file_data = temp_file.read temp_file.close # close instead of unlink to prevent rails for breaking end |