Sha256: a0b5a971891f0614b8288da2a0815b3a3af40063e9e1e9b5c6912f4234041452
Contents?: true
Size: 1.28 KB
Versions: 15
Compression:
Stored size: 1.28 KB
Contents
require 'power_stencil/engine/entities_definitions' require 'power_stencil/engine/directory_processor' require 'power_stencil/engine/renderers/erb' require 'power_stencil/dsl/base' require 'power_stencil/dsl/plugin_generation' require 'power_stencil/dsl/completion' module PowerStencil module Engine class Base UNIVERSE_BASENAME = 'Project entities'.freeze include Climatic::Proxy include PowerStencil::Engine::EntitiesDefinition include PowerStencil::Engine::DirectoryProcessor include PowerStencil::Engine::Renderers::Erb attr_accessor :dsl attr_reader :root_universe def initialize(universe = UniverseCompiler::Universe::Base.new(unique_name)) @root_universe = universe @dsl = PowerStencil::Dsl::Base end def running_context(universe = root_universe, main_entry_point: nil) context = dsl.new universe context.main_entry_point = main_entry_point context.instance_eval do binding end end protected def load_system_entities root_universe << PowerStencil::SystemEntityDefinitions::ProjectConfig.new(fields: PowerStencil.config[]) end def unique_name '%s (%f)' % [UNIVERSE_BASENAME, Time.now.to_f] end end end end
Version data entries
15 entries across 15 versions & 1 rubygems