Class: Lono::Pro::Importer::Base
- Inherits:
-
Object
- Object
- Lono::Pro::Importer::Base
- Includes:
- Download, Thor::Actions, Thor::Base
- Defined in:
- lib/lono/pro/importer/base.rb
Instance Method Summary collapse
-
#initialize(source, options) ⇒ Base
constructor
A new instance of Base.
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, ) @source, @options = source, @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 |