lib/lono/template/generator.rb in lono-7.0.5 vs lib/lono/template/generator.rb in lono-7.1.0

- old
+ new

@@ -2,25 +2,25 @@ class Lono::Template class Generator < Lono::AbstractBase def run # Examples: - # Erb.new(b, options.dup).run - # Dsl.new(b, options.dup).run - generator_class = "Lono::Template::Strategy::#{template_type.camelize}" + # Erb.new(options).run + # Dsl.new(options).run + generator_class = "Lono::Template::Strategy::#{lono_strategy.camelize}" generator_class = Object.const_get(generator_class) generator_class.new(@options).run # The generator strategy class writes template to disk. The inject_configsets reads it back from disk. # Leaving as-is instead of reading all in memory in case there's a reason. inject_configsets end - def template_type + def lono_strategy if @options[:source] "source" else - jadespec = Lono::Jadespec.new(Lono.blueprint_root, "unknown") # abusing Jadespec to get template_type - jadespec.template_type + jadespec = Lono::Jadespec.new(Lono.blueprint_root, "unknown") # abusing Jadespec to get lono_strategy + jadespec.lono_strategy end end def inject_configsets Lono::Configset::Preparer.new(@options).run # register and materialize gems