Class: StartProject::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/start_project/runner.rb

Overview

The Runner class is the entry point to the app

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Runner

Reads the arguments from the command line and creates a new option object.



7
8
9
# File 'lib/start_project/runner.rb', line 7

def initialize(argv)
  @options = Options.new(argv)
end

Instance Method Details

#runObject

The run method is called from the executable. Two static methods download and unzip_file are called, these are the main methods in the gem.



12
13
14
15
# File 'lib/start_project/runner.rb', line 12

def run
  Downloader.download(@options.project_uri)
  Downloader.unzip_file(@options.project_name)
end