Class: ThorTemplate::CLI

Inherits:
Command show all
Defined in:
lib/thor_template/cli.rb,
lib/starter_project/lib/thor_template/cli.rb

Instance Method Summary collapse

Methods inherited from Command

dispatch

Instance Method Details

#hello(name = "you") ⇒ Object



9
10
11
12
# File 'lib/starter_project/lib/thor_template/cli.rb', line 9

def hello(name="you")
  puts "from: #{options[:from]}" if options[:from]
  puts "Hello #{name}"
end

#new(name) ⇒ Object



8
9
10
# File 'lib/thor_template/cli.rb', line 8

def new(name)
  Generator.new(options.merge(name: name)).run
end

#versionObject



13
14
15
# File 'lib/thor_template/cli.rb', line 13

def version
  puts ThorTemplate::VERSION
end