module RaadTotem

Constants

VERSION

Public Class Methods

custom_options() click to toggle source

returns the custom options hash set in the service options_parser class method

@return [Hash] custom options hash

# File lib/raad_totem/env.rb, line 55
def custom_options
  @custom_options
end
jruby?() click to toggle source

are we running inside jruby

@return [Boolean] true if runnig inside jruby

# File lib/raad_totem/env.rb, line 13
def jruby?
  !!(defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
end
ruby_options() click to toggle source

ruby interpreter command line options

@return [Array] command line options list

# File lib/raad_totem/env.rb, line 27
def ruby_options
  @ruby_options ||= []
end
ruby_options=(options_str) click to toggle source

set ruby interpreter command line options

@param [String] options_str space separated options list

# File lib/raad_totem/env.rb, line 34
def ruby_options=(options_str)
  @ruby_options = options_str.split
end
ruby_path() click to toggle source

absolute path of current interpreter

@return [String] absolute path of current interpreter

# File lib/raad_totem/env.rb, line 20
def ruby_path
  File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"] + RbConfig::CONFIG["EXEEXT"])
end
stopped=(state) click to toggle source

used internally to set the stopped flag

@param [Boolean] state true to set the stopped flag

# File lib/raad_totem/env.rb, line 48
def stopped=(state)
  @stop_lock.synchronize{@stopped = !!state}
end
stopped?() click to toggle source

a request to stop the service has been received (or the start method has returned and, if defined, the service stop method has been called by RaadTotem.

@return [Boolean] true is the service has been stopped

# File lib/raad_totem/env.rb, line 41
def stopped?
  @stop_lock.synchronize{@stopped}
end

Private Instance Methods

custom_options() click to toggle source

returns the custom options hash set in the service options_parser class method

@return [Hash] custom options hash

# File lib/raad_totem/env.rb, line 55
def custom_options
  @custom_options
end
jruby?() click to toggle source

are we running inside jruby

@return [Boolean] true if runnig inside jruby

# File lib/raad_totem/env.rb, line 13
def jruby?
  !!(defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
end
ruby_options() click to toggle source

ruby interpreter command line options

@return [Array] command line options list

# File lib/raad_totem/env.rb, line 27
def ruby_options
  @ruby_options ||= []
end
ruby_options=(options_str) click to toggle source

set ruby interpreter command line options

@param [String] options_str space separated options list

# File lib/raad_totem/env.rb, line 34
def ruby_options=(options_str)
  @ruby_options = options_str.split
end
ruby_path() click to toggle source

absolute path of current interpreter

@return [String] absolute path of current interpreter

# File lib/raad_totem/env.rb, line 20
def ruby_path
  File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"] + RbConfig::CONFIG["EXEEXT"])
end
stopped=(state) click to toggle source

used internally to set the stopped flag

@param [Boolean] state true to set the stopped flag

# File lib/raad_totem/env.rb, line 48
def stopped=(state)
  @stop_lock.synchronize{@stopped = !!state}
end
stopped?() click to toggle source

a request to stop the service has been received (or the start method has returned and, if defined, the service stop method has been called by RaadTotem.

@return [Boolean] true is the service has been stopped

# File lib/raad_totem/env.rb, line 41
def stopped?
  @stop_lock.synchronize{@stopped}
end