use local scope variable

This commit is contained in:
Watson
2013-06-15 01:24:38 +09:00
parent 349c3ada05
commit 7ea395a1af

View File

@@ -48,11 +48,11 @@ module Motion; module Project
def initialize(app_name, template_name)
@name = @app_name = app_name
@template_name = template_name.to_s
@repository = Repository.new(@template_name)
repository = Repository.new(@template_name)
if @repository.exist?
@repository.clone
@template_name = @repository.name
if repository.exist?
repository.clone
@template_name = repository.name
end
@template_directory = self.class.all_templates[@template_name]