abstract class Novika::Resolver::Runnable
- Novika::Resolver::Runnable
- Reference
- Object
Overview
Base class of all runnables.
The main basic property of all runnables is that they can be rewritten into other runnables, oftentimes of a more specific kind. Additionally, runnable objects are the head of their history linked list, allowing clients to observe how the runnable of interest came to be.
Included Modules
Direct Known Subclasses
- Novika::Resolver::RunnableCapability
- Novika::Resolver::RunnableContainer
- Novika::Resolver::RunnableDir
- Novika::Resolver::RunnableGroup
- Novika::Resolver::RunnableQuery
- Novika::Resolver::RunnableScript
- Novika::Resolver::RunnableSelector
- Novika::Resolver::RunnableSharedObject
- Novika::Resolver::Slot
Defined in:
novika/resolver.crConstructors
Instance Method Summary
-
#ancestor? : Ancestor | Nil
Returns the ancestor of this runnable, or nil if there is no ancestor.
-
#ancestors : Array(Ancestor)
Returns an array of ancestors of this runnable, starting from the most recent ancestor and ending with the oldest one.
-
#backtrace(io : IO, indent : Int32 = 0, annex : String | Nil = nil)
Appends ancestors of this runnable (its "history") to io.
-
#backtrace(*args, **kwargs, & : IO -> )
Yields an
IO
where you can write the annex, otherwise the same as#backtrace
. -
#constituents : Array(Runnable)
Returns an array with contained runnables.
-
#each_ancestor(& : Ancestor -> )
Yields ancestors of this runnable.
-
#specialize(root : RunnableRoot, container : RunnableContainer)
Further specializes this runnable.
Instance methods inherited from module Novika::Resolver::Runnable::Ancestor
ancestor? : Ancestor | Nil
ancestor?
Constructor Detail
Instance Method Detail
Returns the ancestor of this runnable, or nil if there is no ancestor.
Returns an array of ancestors of this runnable, starting from the most recent ancestor and ending with the oldest one.
Appends ancestors of this runnable (its "history") to io.
indent can be used to specify the amount of whitespace preceding each line.
annex is the additional bit of text displayed below the backtrace. For instance, in case of an error, it can contain the error message.
Yields an IO
where you can write the annex, otherwise the
same as #backtrace
.
Returns an array with contained runnables. If none, returns an
array with self
.
Yields ancestors of this runnable.
By tracing the ancestry of self
, you are effectively exploring
how it came to be.
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.