class Novika::Resolver::RunnableCapability
Overview
Capabilities represent the requirements of a Novika script, library, or application, regarding language features that are needed in order for that script, library, or application to properly work.
Included Modules
- Novika::Resolver::Resolution::Dependency
- Novika::Resolver::Resolution::Dependency::DefaultPrompt
- Novika::Resolver::Runnable::HasDatum(String)
- Novika::Resolver::Runnable::Terminal
Defined in:
novika/resolver.crConstructors
Instance Method Summary
-
#description?(server : PermissionServer) : String | Nil
Returns a user-friendly description of this dependency, or nil if none can be given.
-
#enable(*, in caps : CapabilityCollection)
If this dependency is
allowed?
, enables it in the given capability collection caps. -
#envelope(container : RunnableContainer)
Returns the string representation of this dependency's envelope (its container so to speak).
-
#label(server : PermissionServer) : String
Returns a user-friendly string representation of this dependency.
-
#purpose(*, in caps : CapabilityCollection)
Returns the purpose of this capability in the given capability collection caps.
-
#signature(container : RunnableContainer) : Signature
Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
-
#specialize(root : RunnableRoot, container : RunnableContainer)
Further specializes this runnable.
- #to_s(io)
Instance methods inherited from module Novika::Resolver::Resolution::Dependency::DefaultPrompt
description?(server : PermissionServer) : String | Nil
description?,
envelope(container : RunnableContainer)
envelope,
label(server : PermissionServer) : String
label,
prompt?(server : PermissionServer, *, for container : RunnableContainer) : Permission
prompt?
Instance methods inherited from module Novika::Resolver::Resolution::Dependency
allow
allow,
allowed? : Bool
allowed?,
deny
deny,
enable(*, in caps : CapabilityCollection)
enable,
prompt?(server : PermissionServer, *, for container : RunnableContainer) : Permission
prompt?,
request(server : PermissionServer, *, for container : RunnableContainer)
request,
signature(container : RunnableContainer) : Signature
signature
Instance methods inherited from module Novika::Resolver::Runnable::Terminal
specialize(root : RunnableRoot, container : RunnableContainer)
specialize
Instance methods inherited from module Novika::Resolver::Runnable::HasDatum(String)
==(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
Instance Method Detail
Returns a user-friendly description of this dependency, or nil if none can be given. The returned description should be suitable for displaying to the user in a prompt, and should read well after "which", as in "which [exposes this and that]", "which [allows this and that]", etc., where words in brackets are those of the description.
server is the server that will then use the description in one way or another, in case it is present. You may also choose to derive the description with server's help.
If this dependency is allowed?
, enables it in the given
capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak). The runtime (not specialize-time!) container is provided as a fallback option (albeit a very bad one).
Returns a user-friendly string representation of this dependency. The returned string should be suitable for displaying to the user in a prompt.
server is the permission server that will then use the label in one way or another. You may also choose to derive the label with server's help.
Returns the purpose of this capability in the given capability collection caps.
Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
container, assumed to contain this dependency, may be used to derive the signature.
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.