class Novika::Resolver::RunnableEnvironment

Overview

Represents a Novika environment.

Defined in:

novika/resolver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(root : RunnableRoot, abspath : Path | Nil) #

[View source]

Instance Method Detail

def ==(path : Path) #

Returns whether path points to this environment's directory.


[View source]
def ==(other : self) #

Two environments are equal when their directories are equal.


def abspath #

Returns the absolute path pointing to this environment's directory.


[View source]
def abspath? : Path? #

Returns the absolute path pointing to this environment's directory.


[View source]
def brief(dependency : Resolution::Dependency) #

Returns a brief description of dependency as per this environment.


[View source]
def capability?(datum : String) : Bool #

Returns whether datum is a capability in this environment's capability collection.


[View source]
def designate(set : ResolutionSet) : Designation #

Creates and returns a Designation for this environment to handle the given resolution set.


[View source]
def expand?(datum : Path) : Path | Nil #

Expands datum in this environment's directory. Returns the resulting real path if datum points to something (a file, a directory, etc.); if datum points to nothing, returns nil.


[View source]
def hash(hasher) #

Two environments are equal when their directories are equal.


def includes?(path : Path) : Bool #

Returns whether path is part of this environment's subtree, i.e. is this environment directory's direct or indirect child.


[View source]
def permissions(& : IO -> ) #

Yields writable IO for the content of this environment's permissions file. Creates the latter if necessary. Previous content of the permissions file is cleared.


[View source]
def permissions? : Tuple(String, Path) | Nil #

Returns the content of the permissions file of this environment followed by the file's path; or nil if the permissions file does not exist.


[View source]
def request(dependency : Resolution::Dependency, for container : RunnableContainer) #

Emits a dependency request (see Resolution::Dependency#request) to the permission server of this environment.


[View source]