Class: Specimen::CLI::DefaultCommand

Inherits:
Specimen::Commands::BaseCommand show all
Includes:
Generator
Defined in:
lib/specimen/cli/default_command.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Generator

#create_file_by_template

Class Method Details



12
13
14
# File 'lib/specimen/cli/default_command.rb', line 12

def self.banner(task, namespace = true, subcommand = false)
  "#{basename} #{task.name}"
end

.source_rootObject



16
17
18
# File 'lib/specimen/cli/default_command.rb', line 16

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#commandsObject



32
33
34
# File 'lib/specimen/cli/default_command.rb', line 32

def commands
  [DefaultCommand].each { |cmd| cmd.new.help }
end

#initObject



26
27
28
# File 'lib/specimen/cli/default_command.rb', line 26

def init
  SpecimenProject.start([options.dup])
end