Class: HTML5UP::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/html5up/cli.rb

Instance Method Summary collapse

Instance Method Details

#new(project_name) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/html5up/cli.rb', line 9

def new(project_name)
  template = options[:template]
  puts "Downloading #{template}..."
  filename = "html5up-#{template}.zip"
  url = "html5up.net/#{template}/download"

  Helpers::download(url, filename)
  Helpers::extract(filename, project_name, options)
end

#templatesObject



20
21
22
23
24
# File 'lib/html5up/cli.rb', line 20

def templates
  Helpers::templates.each do |template|
    puts template
  end
end