class MStrap::Runtimes::Crystal
- MStrap::Runtimes::Crystal
- MStrap::Runtime
- Reference
- Object
Overview
Crystal runtime management implmentation. It contains methods for interacting with Crystal via the chosen runtime manager and bootstrapping a Crystal project based on conventions.
Defined in:
mstrap/runtimes/crystal.crInstance Method Summary
-
#bootstrap
Bootstrap the current directory for the runtime
-
#current_version
Returns the version of the language runtime used by the current directory or specified by the environment.
-
#install_packages(packages : Array(Defs::PkgDef), runtime_version : String | Nil = nil) : Bool
Installs global packages for the runtime with an optional version specification, and optional runtime version.
-
#matches? : Bool
Returns whether the project uses the runtime
Instance methods inherited from class MStrap::Runtime
bootstrap
bootstrap,
current_version
current_version,
has_runtime_plugin?
has_runtime_plugin?,
has_version?(version)
has_version?,
has_versions?
has_versions?,
install_packages(packages : Array(Defs::PkgDef), runtime_version : String | Nil = nil) : Bool
install_packages,
installed_versions
installed_versions,
language_name : String
language_name,
latest_version
latest_version,
matches? : Bool
matches?,
runtime_exec(command : String, args : Array(String) | Nil = nil, runtime_version : String | Nil = nil)
runtime_exec,
runtime_manager : MStrap::RuntimeManager
runtime_manager,
setup
setup,
with_dir_version(dir, &)
with_dir_version
Constructor methods inherited from class MStrap::Runtime
new(runtime_manager : RuntimeManager)
new
Instance methods inherited from module MStrap::DSL::System
cmd(env : Hash | Nil, command : String, args : Array(String) | Nil, **kwargs)
cmd,
has_command?(command_name : String, **kwargs) : Bool
has_command?
Instance methods inherited from module MStrap::DSL::Logging
log(msg)
log,
logc(msg)
logc,
logd(msg)
logd,
logn(msg)
logn,
logw(msg)
logw,
success(msg)
success
Instance Method Detail
Bootstrap the current directory for the runtime
Returns the version of the language runtime used by the current directory or specified by the environment.
NOTE This will not traverse parent directories to find versions files.
Installs global packages for the runtime with an optional version specification, and optional runtime version.
NOTE The version specification is dependent upon the underlying package manager and is passed verbatim.
Returns whether the project uses the runtime