module SBSM

SBSM: Application framework for state based session management.

We document here a few aspects of SBSM. As it is written over 10 years after the creation of one of the few users, who never had the chance to discuss with the creator of this piece of software, errors/obmission are found quite often.

The behaviour of SBSM can be extended or overriden in many ways. Often in derived classes you simply define a few constants, these extension points can be spotted by searching for occurrences of -self::class::- in the implementation of SBSM.

Constants

VERSION

Public Class Methods

debug(msg) click to toggle source
# File lib/sbsm/logger.rb, line 50
def self.debug(msg)
  info = "#{File.basename(caller[0])} #{msg}"
  @@logger.debug(info) if @@logger
end
error(msg) click to toggle source
# File lib/sbsm/logger.rb, line 42
def self.error(msg)
  info = "#{File.basename(caller[0])} #{msg}"
  @@logger.error(info) if @@logger
end
info(msg) click to toggle source

a simple logger, which makes it easy to compare the timing of the entries by the different process. Should probably later be replaced by a Rack based logger

# File lib/sbsm/logger.rb, line 38
def self.info(msg)
  info = "#{File.basename(caller[0])} #{msg}"
  @@logger.info(info) if @@logger
end
logger() click to toggle source
# File lib/sbsm/logger.rb, line 33
def self.logger
  @@logger
end
logger=(logger) click to toggle source
# File lib/sbsm/logger.rb, line 30
def self.logger=(logger)
  @@logger = logger
end
warn(msg) click to toggle source
# File lib/sbsm/logger.rb, line 46
def self.warn(msg)
  info = "#{File.basename(caller[0])} #{msg}"
  @@logger.warn(info) if @@logger
end