Module: Servolux
- Defined in:
- lib/servolux.rb,
lib/servolux/version.rb,
lib/servolux/null_logger.rb
Defined Under Namespace
Modules: Threaded Classes: Child, Daemon, NullLogger, PidFile, Piper, Prefork, Server
Constant Summary collapse
- LIBPATH =
:stopdoc:
::File.(::File.dirname(__FILE__)) + ::File::SEPARATOR
- PATH =
::File.dirname(LIBPATH) + ::File::SEPARATOR
- Error =
Generic Servolux Error class.
Class.new(StandardError)
- VERSION =
"0.13.0".freeze
Class Method Summary collapse
-
.fork? ⇒ Boolean
Returns
trueif the execution platform supports fork. -
.libpath(*args) ⇒ String
Returns the library path for the module.
-
.NullLogger ⇒ Object
Syntactic sugar for getting the null logger instance.
-
.path(*args) ⇒ String
Returns the lpath for the module.
-
.version ⇒ Object
Returns the version string for the library.
Class Method Details
.fork? ⇒ Boolean
Returns true if the execution platform supports fork.
35 36 37 |
# File 'lib/servolux.rb', line 35 def self.fork? RUBY_PLATFORM != 'java' and test(?e, '/dev/null') end |
.libpath(*args) ⇒ String
Returns the library path for the module. If any arguments are given, they will be joined to the end of the library path using File.join.
17 18 19 |
# File 'lib/servolux.rb', line 17 def self.libpath( *args ) args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten) end |
.NullLogger ⇒ Object
Syntactic sugar for getting the null logger instance.
Servolux::NullLogger() #=> NullLogger singleton instance
16 17 18 |
# File 'lib/servolux/null_logger.rb', line 16 def self.NullLogger NullLogger.instance end |
.path(*args) ⇒ String
Returns the lpath for the module. If any arguments are given, they will be joined to the end of the servolux base path using File.join.
27 28 29 |
# File 'lib/servolux.rb', line 27 def self.path( *args ) args.empty? ? PATH : ::File.join(PATH, args.flatten) end |
.version ⇒ Object
Returns the version string for the library.
5 6 7 |
# File 'lib/servolux/version.rb', line 5 def self.version VERSION end |