nitc :: CmdCatalogStats :: _stats
Retrieved catalog statisticsnitc :: CmdCatalogStats :: defaultinit
nitc :: CmdCatalogStats :: stats=
Retrieved catalog statisticsnitc $ CmdCatalogStats :: SELF
Type of this instance, automatically specialized in every classnitc :: json_commands $ CmdCatalogStats :: to_json
Return a JSON Serializable representation ofself
results
nitc :: CmdCatalogStats :: _stats
Retrieved catalog statisticscore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdCatalog :: defaultinit
core :: Object :: defaultinit
nitc :: CmdCatalogStats :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: 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 :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: CmdCatalogStats :: stats=
Retrieved catalog statisticsnitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# Retrieve the catalog stats
class CmdCatalogStats
super CmdCatalog
# Retrieved catalog statistics
var stats: nullable CatalogStats = null is optional, writable
redef fun init_command do
super
self.stats = catalog.catalog_stats
return new CmdSuccess
end
end
src/doc/commands/commands_catalog.nit:153,1--165,3
redef class CmdCatalogStats
redef fun to_json do return stats
end
src/doc/templates/json_commands.nit:118,1--120,3
redef class CmdCatalogStats
redef fun execute(no_color) do
if no_color == null or not no_color then
print "Catalog statistics:".bold
else
print "Catalog statistics:"
end
var stats = self.stats.as(not null)
print " * {stats.packages} packages"
print " * {stats.modules} modules"
print " * {stats.methods} methods"
print " * {stats.classes} classes"
print " * {stats.loc} lines of code"
print " * {stats.contributors} contributors"
print " * {stats.maintainers} maintainers"
print " * {stats.tags} tags"
end
end
src/doc/term/term.nit:287,1--305,3