Sha256: 2d1fd7dcac92962f9e1ccd16be4f8088a416f7cf6b6728fd4334c1d3c76414cb

Contents?: true

Size: 705 Bytes

Versions: 29

Compression:

Stored size: 705 Bytes

Contents

module Lono
  class Importer
    def initialize(options)
      @options = options

      Lono::ProjectChecker.check
      @blueprint = Lono::Conventions.new(options).blueprint
      # Dont use set_blueprint_root because it doesnt exist yet. The import creates it
      Lono.blueprint_root = "#{Lono.root}/app/blueprints/#{@blueprint}"
    end

    def run
      # Examples:
      #   Lono::Importer::Erb.new(source, options.clone).run
      #   Lono::Importer::Dsl.new(source, options.clone).run
      type = @options[:type] || 'dsl'
      importer_class = "Lono::Importer::#{type.classify}"
      importer_class = Object.const_get(importer_class)
      importer_class.new(@options).run
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lono-7.5.2 lib/lono/importer.rb
lono-7.5.1 lib/lono/importer.rb
lono-7.5.0 lib/lono/importer.rb
lono-7.4.11 lib/lono/importer.rb
lono-7.4.10 lib/lono/importer.rb
lono-7.4.9 lib/lono/importer.rb
lono-7.4.8 lib/lono/importer.rb
lono-7.4.7 lib/lono/importer.rb
lono-7.4.6 lib/lono/importer.rb
lono-7.4.5 lib/lono/importer.rb
lono-7.4.4 lib/lono/importer.rb
lono-7.4.3 lib/lono/importer.rb
lono-7.4.2 lib/lono/importer.rb
lono-7.4.1 lib/lono/importer.rb
lono-7.4.0 lib/lono/importer.rb
lono-7.3.2 lib/lono/importer.rb
lono-7.3.1 lib/lono/importer.rb
lono-7.3.0 lib/lono/importer.rb
lono-7.2.3 lib/lono/importer.rb
lono-7.2.2 lib/lono/importer.rb