Sha256: 0b26f29f9626a4c7be8591837bb6fd2d2fc2ef3e28efc098527e93af55155dcd
Contents?: true
Size: 1.6 KB
Versions: 40
Compression:
Stored size: 1.6 KB
Contents
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and # the licensee module RightConf # Configurator mixin, defines DSL and common validation method class ConfiguratorRegistry include Singleton # Associate configurator with given key # # === Parameters # key(Symbol):: Key configurator should be associated with # value(Class):: Associated configurator class # # === Return # value(Class):: Configurator class def []=(key, value) @configurators[key] = value end # Configurator class for given key # # === Parameters # key(String):: Configurator for given key # # === Return # cfg_class(Constant):: Configurator class if there is one # nil:: Otherwise def [](key) @configurators[key] end # Iterate through all configurators # # === Block # Block should take one argument which is the configurator being iterated on # # === Return # true:: Always return true def each(&blk) @configurators.each(&blk) true end protected # Initialize configurators hash def initialize @configurators = Hash.new end end end
Version data entries
40 entries across 40 versions & 1 rubygems