Class: Teapot::Command::Create
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Teapot::Command::Create
- Defined in:
- lib/teapot/command.rb
Instance Method Summary collapse
Instance Method Details
#invoke(parent) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/teapot/command.rb', line 46 def invoke(parent) project_path = parent.root || project_name.gsub(/\s+/, '-').downcase root = ::Build::Files::Path.(project_path) if root.exist? raise ArgumentError.new("#{root} already exists!") end # Make the path: root.create Teapot::Repository.new(root).init! parent.controller(root).create(@project_name, @source, @packages) end |