Class: Vrowser::Daemon
- Inherits:
-
Object
- Object
- Vrowser::Daemon
- Defined in:
- lib/vrowser/http_daemon.rb
Class Method Summary collapse
Instance Method Summary collapse
- #daemonize! ⇒ Object
-
#initialize(options = {}) {|_self| ... } ⇒ Daemon
constructor
A new instance of Daemon.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Daemon
Returns a new instance of Daemon.
14 15 16 17 18 |
# File 'lib/vrowser/http_daemon.rb', line 14 def initialize(={}) @config_path = [:config_path] or raise ArgumentError("config_path") yield(self) if block_given? self end |
Class Method Details
.start(options = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/vrowser/http_daemon.rb', line 7 def self.start(={}) self.new() do |instance| instance.start end end |
Instance Method Details
#daemonize! ⇒ Object
25 26 27 |
# File 'lib/vrowser/http_daemon.rb', line 25 def daemonize! Process.daemon end |
#start ⇒ Object
20 21 22 23 |
# File 'lib/vrowser/http_daemon.rb', line 20 def start fetch_and_update @config_path regist_stop end |
#stop ⇒ Object
29 30 |
# File 'lib/vrowser/http_daemon.rb', line 29 def stop end |