module Novika::Resolver::Resolution::Dependency::DefaultPrompt
Overview
Provides the includer with an implementation of Dependency#prompt?
in turn requiring it to simply specify a #label
.
Direct including types
Defined in:
novika/resolver.crInstance Method Summary
-
#description?(server : PermissionServer) : String | Nil
Returns a user-friendly description of this dependency, or nil if none can be given.
-
#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.
- #prompt?(server : PermissionServer, *, for container : RunnableContainer) : Permission
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.
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.