abstract class Novika::Resolver::Slot

Overview

Base class of ScriptsSlot (known to the user as *), SubtreeSlot (known to the user as **), and ChildSlot (<>).

Slots act as mere sentinels (or placeholders). They get #replaced with runnable containers that hold the appropriate runnables during postprocessing of the manifest file, provided the latter has some slots to begin with.

The use of slot literals *, **, and <> is only allowed inside manifest files.

Even though using several *s is allowed, it is pointless to do so because the first * (or ** for that matter) will 'consume' all remaining file system entries, leaving none to the second, third, etc. * or **.

Included Modules

Direct Known Subclasses

Defined in:

novika/resolver.cr

Instance Method Summary

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

specialize(root : RunnableRoot, container : RunnableContainer) specialize

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?

Instance Method Detail

abstract def replace(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer #

Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.

manifest is the manifest that contains this slot.

group is the RunnableGroup of the manifest that contains this slot.

Returns the next population container.


[View source]