Sha256: 59751d8b2c3763a11dfd6e5f29ca1ca74ba2a8faf2f8c5dccb15a56493e54c7a
Contents?: true
Size: 1.12 KB
Versions: 29
Compression:
Stored size: 1.12 KB
Contents
require 'veewee/config/component' require 'veewee/definition' require 'ostruct' module Veewee class Config class Definition attr_accessor :components attr_reader :env def initialize(config) @env=config.env @components=Hash.new end # Currently not used, this is in case we will specify the a definition in the Veeweefile # This is for future needs def define(name) # Depending on type, we create a variable of that type definition_stub=OpenStruct.new begin # Get a real definition object real_definition=::Veewee::Definition.new(name,env) rescue Error => e env.ui.error("Error loading provider with #{name},#{$!}",:prefix => false) end definition_stub.definition=real_definition env.logger.debug("config definition"){ "Start defining definition"} yield definition_stub env.logger.debug("config definition"){ "End defining definition #{definition_stub.definition.name}"} components[name.to_s]=definition_stub.definition end end end end #Module Veewee
Version data entries
29 entries across 29 versions & 2 rubygems