lib/vedeu/distributed/server.rb in vedeu-0.4.45 vs lib/vedeu/distributed/server.rb in vedeu-0.4.46

- old
+ new

@@ -8,40 +8,47 @@ $SAFE = 1 # disable `eval` and related calls on strings passed include Singleton # @param (see #input) + # @see #input def self.input(data, type = :key) instance.input(data, type) end # @return [void] + # @see #output def self.output instance.output end # @return [void] + # @see #restart def self.restart instance.restart end # @return [void] + # @see #shutdown def self.shutdown instance.shutdown end # @return [void] + # @see #start def self.start instance.start end # @return [Symbol] + # @see #status def self.status instance.status end # @return [void] + # @see #stop def self.stop instance.stop end # @param data [String|Symbol] @@ -61,10 +68,12 @@ # @return [Fixnum] The PID of the currently running application. def pid Process.pid end + # Restart the DRb server. + # # @return [void] def restart log('Attempting to restart') return not_enabled unless drb? @@ -100,10 +109,12 @@ Vedeu.trigger(:_exit_) Vedeu::Terminal.restore_screen end + # Start the DRb server. + # # @return [Vedeu::Distributed::Server] def start log('Attempting to start') return not_enabled unless drb? @@ -118,10 +129,12 @@ # DRb.thread.join # not convinced this is needed here end end + # Fetch the status of the DRb server. + # # @return [Symbol] def status log('Fetching status') return not_enabled unless drb? @@ -137,9 +150,11 @@ :stopped end end + # Stop the DRb server. + # # @return [void] def stop log('Attempting to stop') return not_enabled unless drb?