Class: RubyScreen::Executer

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_screen/executer.rb

Instance Method Summary collapse

Constructor Details

#initialize(description) ⇒ Executer

Returns a new instance of Executer.



5
6
7
8
9
10
# File 'lib/ruby_screen/executer.rb', line 5

def initialize(description)
  File.open(configuration_file_path, "w") { |f| f.print description.to_screen_configuration }

  change_directory(description.working_directory) if description.working_directory
  Kernel.exec "screen -c #{configuration_file_path}"
end