Class: HappyCLI::Command

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/happy-cli.rb

Instance Method Summary collapse

Instance Method Details

#new(name) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/happy-cli.rb', line 18

def new(name)
  @name = name
  self.destination_root = name
  directory options[:template], '.'

  in_root do
    if options[:git]
      run "git init"
      run "git add ."
      run "git commit -m 'Created new Happy application using the '#{options[:template]}' template'"
    end
  end
end