Class: QuickStart::Program
- Inherits:
-
Object
- Object
- QuickStart::Program
- Defined in:
- lib/quick_start/program.rb
Constant Summary collapse
- @@map =
{ :firefox => '/usr/bin/firefox', :evolution => '/usr/bin/evolution', :skype => '/usr/bin/skype', :terminal => '/usr/bin/gnome-terminal' }
Class Attribute Summary collapse
-
.map ⇒ Object
readonly
Returns the value of attribute map.
Class Method Summary collapse
Class Attribute Details
.map ⇒ Object (readonly)
Returns the value of attribute map.
13 14 15 |
# File 'lib/quick_start/program.rb', line 13 def map @map end |
Class Method Details
.run(name) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/quick_start/program.rb', line 15 def run( name ) puts "running #{name} #{@@map[name.to_sym]}" pid = Kernel.fork do exec( @@map[name.to_sym] ) end Process.detach(pid) end |