class Lono::Pro::Importer
Public Class Methods
new(source, options)
click to toggle source
# File lib/lono/pro/importer.rb, line 3 def initialize(source, options) @source, @options = source, options Lono::ProjectChecker.check # Dont use set_blueprint_root because it doesnt exist yet. The import creates it Lono.blueprint_root = "#{Lono.root}/blueprints/#{@blueprint}" end
Public Instance Methods
run()
click to toggle source
# File lib/lono/pro/importer.rb, line 11 def run # Examples: # Lono::Pro::Importer::Erb.new(source, options.clone).run # Lono::Pro::Importer::Dsl.new(source, options.clone).run type = @options[:type] || 'dsl' importer_class = "Lono::Pro::Importer::#{type.classify}" importer_class = Object.const_get(importer_class) importer_class.new(@source, @options.clone).run end