Method: Copland::Registry#initialize

Defined in:
lib/copland/registry.rb

#initialize(options = {}) ⇒ Registry

Create a new, empty registry. The options hash accepts any value that LogFactory’s constructor accepts, with “log_” prefixed. (I.e., :log_device instead of :device.)



123
124
125
126
127
128
129
130
131
132
# File 'lib/copland/registry.rb', line 123

def initialize( options={} )
  @packages = Hash.new

  log_options = Hash.new
  options.each do |k,v|
    log_options[$1.intern] = v if k.to_s =~ /^log_(.*)/
  end

  @logs = LogFactory.new( log_options )
end