Class: Milieu::CLI::Command::Init

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/milieu/cli/command/init.rb

Instance Method Summary collapse

Instance Method Details

#call(path: ".") ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/milieu/cli/command/init.rb', line 13

def call(path: ".", **)
  @milieu_folder = File.join(path, ".milieu")
  if Dir.exist?(@milieu_folder)
    warn "Milieu workspace already exists.\n"
    return
  end
  create_workspace_dir
  create_schema_file
end