nitc :: CmdMessage
A message returned by a command. Messages are used to inform the client of the command initialization status and results. Mostly, messages are used to check if a command is in an error state.
nitc :: CmdMessage :: _http_status_code
HTTP code to return for this messagenitc :: CmdMessage :: defaultinit
nitc :: CmdMessage :: http_status_code
HTTP code to return for this messagenitc :: CmdMessage :: http_status_code=
HTTP code to return for this messagenitc :: CmdMessage :: print_message
nitc :: CmdMessage :: to_json
Return a JSON Serializable representation ofself
nitc $ CmdMessage :: SELF
Type of this instance, automatically specialized in every classnitc :: CmdMessage :: _http_status_code
HTTP code to return for this messagecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: CmdMessage :: defaultinit
core :: Object :: defaultinit
nitc :: CmdMessage :: http_status_code
HTTP code to return for this messagenitc :: CmdMessage :: http_status_code=
HTTP code to return for this messagecore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: CmdMessage :: print_message
nitc :: CmdMessage :: to_json
Return a JSON Serializable representation ofself
mentity
mentity
# Command message
#
# A message returned by a command.
# Messages are used to inform the client of the command initialization status and results.
# Mostly, messages are used to check if a command is in an error state.
abstract class CmdMessage
end
src/doc/commands/commands_base.nit:81,1--87,3
redef class CmdMessage
# HTTP code to return for this message
var http_status_code = 200
end
src/doc/commands/commands_http.nit:82,1--85,3
redef class CmdMessage
# Render the message as a HTML string
fun to_md: Writable is abstract
end
src/doc/templates/md_commands.nit:32,1--36,3
redef class CmdMessage
# Return a JSON Serializable representation of `self`
fun to_json: nullable Serializable do
var obj = new JsonObject
obj["status"] = class_name
obj["message"] = to_s
return obj
end
end
src/doc/templates/json_commands.nit:34,1--42,3
redef class CmdMessage
fun print_message(no_color: nullable Bool) do print to_s
end
src/doc/term/term.nit:48,1--50,3
redef class CmdMessage
# Render the message as a HTML string
fun to_html: Writable is abstract
end
src/doc/templates/html_commands.nit:35,1--39,3