class Novika::Resolver::RunnableEnvironment
- Novika::Resolver::RunnableEnvironment
- Reference
- Object
Overview
Represents a Novika environment.
Defined in:
novika/resolver.crConstructors
Instance Method Summary
-
#==(path : Path)
Returns whether path points to this environment's directory.
-
#==(other : self)
Two environments are equal when their directories are equal.
-
#abspath
Returns the absolute path pointing to this environment's directory.
-
#abspath? : Path?
Returns the absolute path pointing to this environment's directory.
-
#brief(dependency : Resolution::Dependency)
Returns a brief description of dependency as per this environment.
-
#capability?(datum : String) : Bool
Returns whether datum is a capability in this environment's capability collection.
-
#designate(set : ResolutionSet) : Designation
Creates and returns a
Designation
for this environment to handle the given resolution set. -
#expand?(datum : Path) : Path | Nil
Expands datum in this environment's directory.
-
#hash(hasher)
Two environments are equal when their directories are equal.
-
#includes?(path : Path) : Bool
Returns whether path is part of this environment's subtree, i.e.
-
#permissions(& : IO -> )
Yields writable
IO
for the content of this environment's permissions file. -
#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.
-
#request(dependency : Resolution::Dependency, for container : RunnableContainer)
Emits a dependency request (see
Resolution::Dependency#request
) to the permission server of this environment.
Constructor Detail
Instance Method Detail
Returns a brief description of dependency as per this environment.
Returns whether datum is a capability in this environment's capability collection.
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.
Returns whether path is part of this environment's subtree, i.e. is this environment directory's direct or indirect child.
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.
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.
Emits a dependency request (see Resolution::Dependency#request
)
to the permission server of this environment.