Class: Lono::Pro::Importer::Base

Inherits:
Object
  • Object
show all
Includes:
Download, Thor::Actions, Thor::Base
Defined in:
lib/lono/pro/importer/base.rb

Direct Known Subclasses

Dsl, Erb

Instance Method Summary collapse

Methods included from Download

#download_template, #json?, #read_source

Constructor Details

#initialize(source, options) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/lono/pro/importer/base.rb', line 7

def initialize(source, options)
  @source, @options = source, options
  @blueprint = @options[:blueprint] || blueprint_name
  @template = @options[:template] || @blueprint
  Lono::ProjectChecker.check
  # Dont use set_blueprint_root because it doesnt exist yet. We're creating it with import
  Lono.blueprint_root = "#{Lono.root}/blueprints/#{@blueprint}"

  @tmp_path = "/tmp/lono/import/template.yml"
  self.destination_root = Dir.pwd # Thor::Actions require destination_root to be set
end