class Novika::Resolver::RunnableGroup

Overview

A runnable group is a directory with or without a manifest: that is, a directory with awareness of whether it is an application, library, or simply that - a directory.

Runnable groups, through manifests, are directories with a specific runnable layout.

Runnable groups are rewritten to properly ordered (laid out) RunnableContainers.

Now to the important bit: since there is never a guaranteed link between a runnable group and the container it was/will be rewritten to, you should manually register it with RunnableRoot#assign if you ever want the container to run.

Included Modules

Defined in:

novika/resolver.cr

Constructors

Instance Method Summary

Instance methods inherited from module Novika::Resolver::Runnable::HasDatum(Path)

==(other : T)
==(other : self)
==
, hash(hasher) hash

Instance methods inherited from class Novika::Resolver::Runnable

ancestor? : Ancestor | Nil ancestor?, ancestors : Array(Ancestor) ancestors, backtrace(io : IO, indent : Int32 = 0, annex : String | Nil = nil)
backtrace(*args, **kwargs, & : IO -> )
backtrace
, constituents : Array(Runnable) constituents, each_ancestor(& : Ancestor -> ) each_ancestor, specialize(root : RunnableRoot, container : RunnableContainer) specialize

Constructor methods inherited from class Novika::Resolver::Runnable

new(ancestor : Ancestor | Nil = nil) new

Instance methods inherited from module Novika::Resolver::Runnable::Ancestor

ancestor? : Ancestor | Nil ancestor?

Constructor Detail

def self.new(datum : Path, manifest : Manifest, ancestor = nil) #

Creates a new runnable group.

manifest is the manifest of this group. Manifests control the order of runnables in this group.

datum is a normalized path to the group (a directory).


Instance Method Detail

def abspath #

Returns an absolute path to this group.


def app? : Bool #

Returns whether this group represents an app (is laid out according to a '.nk.app' manifest).


def entry_name : String #

Constructs and returns entry filename for this group.

For instance, if this group's directory is '/path/to/foo', then its entry filename will be 'foo.nk'.


def lib? : Bool #

Returns whether this group represents a lib (is laid out according to a '.nk.lib' manifest).


def name : String #

Returns the name of this group.


def specialize(root : RunnableRoot, container : RunnableContainer) #
Description copied from class Novika::Resolver::Runnable

Further specializes this runnable. Appends the specialized runnable to (or interacts in some other way with) container. The latter is assumed to be incomplete (or partially complete, which is really the same thing).

root is the runnable root object. It is mainly used for flags and thorough rewriting.


def to_s(io) #