lib/cedar/resources.rb
def configure(obj_conf)
      case obj_conf
      when Hash
        obj_conf = obj_conf.with_indifferent_access
        # create a deferred instantiator for this object:
        obj_type = find_object_type(obj_conf)
        constructor = Constructor.new(self, obj_type, obj_conf)
        cat = obj_type.category
        @ctors[cat][obj_conf[:name]] = constructor
      when String
        configure get_data(obj_conf)
      when Array
        obj_conf.each do |c| configure c end
      end
    end
# Register one or more object configurations.
# All object config Hashes must have :name and :type keys. (Keys may be strings or symbols)
# When given an Array, each item of the Array will be re-sent to #configure.
# When given a String, it's assumed to be a data file, which is loaded and sent to #configure.
Register one or more object configurations.
All object config Hashes must have :name and :type keys. (Keys may be strings or symbols)
When given an Array, each item of the Array will be re-sent to #configure.
When given a String, it's assumed to be a data file, which is loaded and sent to #configure.
Register one or more object configurations . All object config Hashes must have : name and : type keys . ( Keys may be strings or symbols ) When given an Array each item of the Array will be re - sent to #configure . When given a String it ' s assumed to be a data file which is loaded and sent to #configure .
def configure(obj_conf)
      case obj_conf
      when Hash
        obj_conf = obj_conf.with_indifferent_access
        obj_type = find_object_type(obj_conf)
        constructor = Constructor.new(self, obj_type, obj_conf)
        cat = obj_type.category
        @ctors[cat][obj_conf[:name]] = constructor
      when String
        configure get_data(obj_conf)
      when Array
        obj_conf.each do |c| configure c end
      end
    end
def configure ( obj_conf ) case obj_conf when Hash obj_conf = obj_conf . with_indifferent_access obj_type = find_object_type ( obj_conf ) constructor = Constructor . new ( self , obj_type , obj_conf ) cat = obj_type . category @ctors [ cat ] [ obj_conf [ :name ] ] = constructor when String configure get_data ( obj_conf ) when Array obj_conf . each do | c | configure c end end end
Register one or more object configurations.
Register one or more object configurations .
# create a deferred instantiator for this object:
obj_conf