Class: ViewServer::Launcher

Inherits:
Object
  • Object
show all
Defined in:
lib/view_server/launcher.rb

Instance Method Summary collapse

Instance Method Details

#launch(data, file_ext = 'txt') ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/view_server/launcher.rb', line 3

def launch(data, file_ext = 'txt')
  TmpFile.open("", "." + file_ext) do |a|
    a << data
    a.close
    `open #{a.path} `
    sleep 5 #We don't want to delete the file before it's loaded
  end
end