module PowerStencil::Plugins::Dsl
Public Instance Methods
apply_extra_dsl(dsl_base)
click to toggle source
# File lib/power_stencil/plugins/dsl.rb, line 22 def apply_extra_dsl(dsl_base) dsl_modules.each do |dsl_module| logger.debug "Applying extra DSL '#{dsl_module.name}' to base DSL..." dsl_base.extend dsl_module end end
dsl_modules()
click to toggle source
# File lib/power_stencil/plugins/dsl.rb, line 18 def dsl_modules dsl_modules_names.map { |dsl_module_name| Object.const_get dsl_module_name } end
dsl_modules_names()
click to toggle source
# File lib/power_stencil/plugins/dsl.rb, line 6 def dsl_modules_names return [] if plugin_definition[:dsl].nil? case plugin_definition[:dsl] when String [plugin_definition[:dsl]] when Array plugin_definition[:dsl] else raise PowerStencil::Error, "Invalid DSL definition for plugin '#{self.name}' !" end end