Class: Pandora::Commands::Create

Inherits:
Object
  • Object
show all
Defined in:
lib/pandora/commands/create.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, name) ⇒ Create

Initializes the command

Parameters:

  • directory (String)

    where the framework will be created.

  • framework (String)

    name.



15
16
17
18
19
# File 'lib/pandora/commands/create.rb', line 15

def initialize(path, name)
  @path = path
  @name = name
  @url = "https://github.com/frameworkoriented/template/archive/master.zip"
end

Instance Method Details

#executeObject

Executes the command



22
23
24
25
26
27
28
29
# File 'lib/pandora/commands/create.rb', line 22

def execute
  self.download_template
  self.unzip_template
  self.rename_files(self.framework_path)
  self.rename_files_content
  puts "Enjoy #{@name} FRAMEWORK! #yatusabes".colorize(:light_yellow)
  system "open #{project_path}"
end