Class: Arfi::Commands::Project

Inherits:
Thor
  • Object
show all
Defined in:
lib/arfi/commands/project.rb

Overview

Arfi::Commands::Project class is used to create ‘db/functions` directory.

Constant Summary collapse

ADAPTERS =
%i[postgresql mysql].freeze

Instance Method Summary collapse

Instance Method Details

#createvoid

This method returns an undefined value.

Arfi::Commands::Project#create -> void

This command is used to create ‘db/functions` directory.

Examples:

bundle exec arfi project create

Raises:



29
30
31
32
33
34
35
# File 'lib/arfi/commands/project.rb', line 29

def create
  raise Arfi::Errors::InvalidSchemaFormat unless ActiveRecord.schema_format == :ruby # steep:ignore NoMethod
  return puts "Directory #{functions_dir} already exists" if Dir.exist?(functions_dir)

  FileUtils.mkdir_p(functions_dir)
  puts "Created: #{functions_dir}"
end