Class: Beez::CLI
Instance Attribute Summary collapse
-
#launcher ⇒ Object
Returns the value of attribute launcher.
Instance Method Summary collapse
Instance Attribute Details
#launcher ⇒ Object
Returns the value of attribute launcher.
13 14 15 |
# File 'lib/beez/cli.rb', line 13 def launcher @launcher end |
Instance Method Details
#parse(argv = ARGV) ⇒ Object
15 16 17 |
# File 'lib/beez/cli.rb', line 15 def parse(argv = ARGV) (argv) end |
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/beez/cli.rb', line 19 def run boot self_read, self_write = IO.pipe sigs = %w[INT TERM] sigs.each do |sig| trap sig do self_write.write("#{sig}\n") end rescue ArgumentError logger.warn "Signal #{sig} not supported" end launch(self_read) end |