Sha256: 70a328e9985ea17eee8e1110b95336dba2cb9bc6f7f52b48baf84db928c934b8

Contents?: true

Size: 656 Bytes

Versions: 15

Compression:

Stored size: 656 Bytes

Contents

require "yaml"

class Lono::Template
  class Generator < Lono::AbstractBase
    def run
      # Examples:
      #   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 classes write templates to disk
    end

    def lono_strategy
      if @options[:source]
        "source"
      else
        jadespec = Lono::Jadespec.new(Lono.blueprint_root, "unknown") # abusing Jadespec to get lono_strategy
        jadespec.lono_strategy
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lono-7.5.2 lib/lono/template/generator.rb
lono-7.5.1 lib/lono/template/generator.rb
lono-7.5.0 lib/lono/template/generator.rb
lono-7.4.11 lib/lono/template/generator.rb
lono-7.4.10 lib/lono/template/generator.rb
lono-7.4.9 lib/lono/template/generator.rb
lono-7.4.8 lib/lono/template/generator.rb
lono-7.4.7 lib/lono/template/generator.rb
lono-7.4.6 lib/lono/template/generator.rb
lono-7.4.5 lib/lono/template/generator.rb
lono-7.4.4 lib/lono/template/generator.rb
lono-7.4.3 lib/lono/template/generator.rb
lono-7.4.2 lib/lono/template/generator.rb
lono-7.4.1 lib/lono/template/generator.rb
lono-7.4.0 lib/lono/template/generator.rb