struct Novika::Resolver::Designation

Overview

Designation objects encapsulate a runnable environment and a set of resolutions that should be run within that environment.

The preferred way to create designations is via RunnableEnvironment#designate.

After obtaining a designation, you can #run it as many times as you want.

Defined in:

novika/resolver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection) #

Instance Method Detail

Returns this designation's own capability collection.


def label : String #

Returns the label of this designation. It is formed from the basename of this designation's runnable environment.


def run #

Runs the designated resolutions under a new common toplevel block.


def slurp(target : Block) #

Parses the designated resolutions and appends the parsed forms to target. Their order is kept, and matches that of the designated resolutions.


def to_s(io, sm = false) #

Appends the string representation of this designation to io.

sm, if set to true, enables SMall output mode. In this mode, only relative paths of the designated resolutions are appended to io, separated by newlines.