Class: Pandora::Commands::Create
- Inherits:
-
Object
- Object
- Pandora::Commands::Create
- Defined in:
- lib/pandora/commands/create.rb
Instance Method Summary collapse
-
#execute ⇒ Object
Executes the command.
-
#initialize(path, name, organization, open_when_completed = false, verbose = true) ⇒ Create
constructor
Initializes the command.
Constructor Details
#initialize(path, name, organization, open_when_completed = false, verbose = true) ⇒ Create
Initializes the command
18 19 20 21 22 23 24 25 |
# File 'lib/pandora/commands/create.rb', line 18 def initialize(path, name, organization, open_when_completed = false, verbose = true) @path = path @name = name @organization = organization @url = "https://github.com/frameworkoriented/template/archive/master.zip" @open_when_completed = open_when_completed @verbose = verbose end |
Instance Method Details
#execute ⇒ Object
Executes the command
28 29 30 31 32 33 34 35 |
# File 'lib/pandora/commands/create.rb', line 28 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) if @verbose system "open #{project_path}" if @open_when_completed end |