kales-cli / kales.cli.task / GenerateControllerTask

GenerateControllerTask

class GenerateControllerTask : KalesContextualTask

Generates a controller class

Constructors

<init>

GenerateControllerTask(workingDirectory: File, name: String, actions: Set<String> = setOf())

Generates a controller class

Inherited Properties

appDirectory

val appDirectory: File

returns the directory where the code for package "com.example.foo.app" is found

applicationRootDir

val applicationRootDir: File

appPackageName

val appPackageName: String?

returns "com.example.foo"

dbMigrateDir

val dbMigrateDir: File

Returns the path to the migrations directory

resourcesDir

val resourcesDir: File

Functions

run

fun run(): Unit

Inherited Functions

rawWriteTo

fun FileSpec.rawWriteTo(destination: Path): Unit

Writes this FileSpec to the provided file Path

readDatabaseConfig

fun readDatabaseConfig(): KalesDatabaseConfig

Returns a KalesDatabaseConfig representing the current project's database.yml file