Namespace

BrB

Brb Main class used to do basic distributed ruby, Simple but fast Use two distinct canal, one for the command reception, and the other one for send return value

Public Class Methods

default_logger() click to toggle source

returns the default logger instance

# File lib/brb/logger.rb, line 7
def default_logger
  Logger.new(STDOUT)
end
logger() click to toggle source

returns the logger instance

# File lib/brb/logger.rb, line 17
def logger
  # use default logger if no custom logger is set
  @@logger = default_logger unless defined? @@logger
  
  # this overwrites the original method with a static definition
  eval %{
    def logger
      @@logger
    end
  }
  @@logger
end
logger=(custom_logger) click to toggle source

set a custom logger instance

# File lib/brb/logger.rb, line 12
def logger=(custom_logger)
  @@logger = custom_logger
end

Public Instance Methods

logger() click to toggle source

alias to BrB.logger

# File lib/brb/logger.rb, line 32
def logger
  BrB.logger
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.