Top Level Namespace

Defined in:

Method Summary

Method Detail

def binary_name(file : String) : String #

Get the base name of a crystal file for use as binary name Ex. /path/to/file.cr => file


[View source]
def clear_bin_dir : Nil #

Delete all items from bin/ USE WITH CAUTION


[View source]
def ensure_bin_dir : Nil #

Ensure bin directory exists in current directory. If bin already exists, no error is raised.


[View source]
def get_files(dir : String, ext : Array(String), &block : String -> ) : Nil #

Calls block on each file in directory that matches an extension in provided list


[View source]
def get_files(dir : String, &block : String -> ) : Nil #

Calls block on each file in directory


[View source]
def recurse(mode : Symbol, dir : String, &block : String -> ) : Nil #

Recurses a directory and calls the block on each item depending on mode mode can be :all, :dir, or :file :dir ignores files, :file ignores directories


[View source]
def recurse_files(dir : String, ext : Array(String), &block : String -> ) : Nil #

Recurses a directory and calls the block on each file if it matches an extension in provided array


[View source]
def release_build(src : String, bin : String, opt : String = "") : Nil #

Build binary with name bin using src


[View source]
def run_binary(bin : String, input : String, log : String) : Nil #

Run binary with input string and output to log file


[View source]
def run_script(interpreter : String, file : String, log : String) : Nil #

Run script using interpreter and output to log file


[View source]