Class: Castkit::CLI::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/castkit/cli/main.rb

Overview

Main CLI entry point for Castkit.

Provides top-level commands for printing the gem version and generating Castkit components.

Examples:

Print the version

$ castkit version

Generate a DataObject

$ castkit generate dataobject User name:string age:integer

Instance Method Summary collapse

Instance Method Details

#generatevoid

This method returns an undefined value.

Dispatches to the ‘castkit generate` subcommands.

Supports generating components like ‘type`, `dataobject`, `contract`, etc.



32
# File 'lib/castkit/cli/main.rb', line 32

subcommand "generate", Castkit::CLI::Generate

#listvoid

This method returns an undefined value.

Dispatches to the ‘castkit list` subcommands.

Supports listing components like ‘type`, `dataobject`, `contract`, etc.



40
# File 'lib/castkit/cli/main.rb', line 40

subcommand "list", Castkit::CLI::List

#versionvoid

This method returns an undefined value.

Outputs the current Castkit version.



22
23
24
# File 'lib/castkit/cli/main.rb', line 22

def version
  puts Castkit::VERSION
end