Module: Redstruct

Defined in:
lib/redstruct.rb,
lib/redstruct/set.rb,
lib/redstruct/hash.rb,
lib/redstruct/list.rb,
lib/redstruct/lock.rb,
lib/redstruct/error.rb,
lib/redstruct/script.rb,
lib/redstruct/string.rb,
lib/redstruct/struct.rb,
lib/redstruct/counter.rb,
lib/redstruct/factory.rb,
lib/redstruct/version.rb,
lib/redstruct/sorted_set.rb,
lib/redstruct/configuration.rb,
lib/redstruct/factory/object.rb,
lib/redstruct/utils/coercion.rb,
lib/redstruct/utils/iterable.rb,
lib/redstruct/connection_proxy.rb,
lib/redstruct/sorted_set/slice.rb,
lib/redstruct/utils/scriptable.rb,
lib/redstruct/utils/inspectable.rb,
lib/redstruct/utils/atomic_counter.rb

Overview

Top level namespace TODO: Add documentation later

Defined Under Namespace

Modules: Utils Classes: Configuration, ConnectionProxy, Counter, Error, Factory, Hash, List, Lock, Script, Set, SortedSet, String, Struct

Constant Summary collapse

VERSION =

Current version

'0.2.3'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerLogger

The current logger; if nil, will lazily create a default logger (STDOUT, WARN)

Returns:

  • (Logger)

    current logger



18
19
20
# File 'lib/redstruct.rb', line 18

def logger
  return @logger ||= default_logger
end

Class Method Details

.configRedstruct::Configuration

Returns current default configuration.

Returns:



12
13
14
# File 'lib/redstruct.rb', line 12

def config
  return @config ||= Redstruct::Configuration.new
end

.default_loggerObject



23
24
25
26
27
28
# File 'lib/redstruct.rb', line 23

def default_logger
  logger = Logger.new(STDOUT)
  logger.level = Logger::WARN
  logger.progname = 'Redstruct'
  return logger
end