Class: Castanaut::Main
- Inherits:
-
Object
- Object
- Castanaut::Main
- Defined in:
- lib/castanaut/main.rb
Overview
When running the Castanaut library as an executable, this class manages the invocation of the user-specified screenplay.
Class Method Summary collapse
-
.run(args) ⇒ Object
If Castanaut is not running, this runs the movie specified as the first argument.
Class Method Details
.run(args) ⇒ Object
If Castanaut is not running, this runs the movie specified as the first argument. If it is already running, this nixes the flag file, which should cause Castanaut to stop.
10 11 12 13 14 15 16 |
# File 'lib/castanaut/main.rb', line 10 def self.run(args) if File.exists?(Castanaut::FILE_RUNNING) File.unlink(Castanaut::FILE_RUNNING) else Castanaut::Movie.spawn(args.shift) end end |