Class: Onceover::CLI::Init

Inherits:
Object
  • Object
show all
Defined in:
lib/onceover/cli/init.rb

Class Method Summary collapse

Class Method Details

.commandObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/onceover/cli/init.rb', line 11

def self.command
  @command ||= Cri::Command.define do
    name 'init'
    usage 'init'
    summary 'Sets up a controlrepo for testing from scratch'
    description <<-DESCRIPTION
This will generate all of the config files required for the onceover
tool to work.
    DESCRIPTION

    run do |opts, args, cmd|
      Onceover::Controlrepo.init(Onceover::Controlrepo.new(opts))
      # Would it make sense for #init to be a class instance method of Controlrepo ? Then you could:
      # cp = Onceover::Controlrepo.new(opts)
      # cp.init
    end
  end
end