Skip to content

class Crystal::Doc::Generator
inherits Reference

Constants

FLAG_COLORS = {"BUG" => "red", "DEPRECATED" => "red", "EXPERIMENTAL" => "lime", "FIXME" => "yellow", "NOTE" => "purple", "OPTIMIZE" => "green", "TODO" => "orange"}

Adding a flag and associated css class will add support in parser

FLAGS = FLAG_COLORS.keys

Class methods

.new(program : Program, included_dirs : Array(String), output_dir : String, output_format : String, sitemap_base_url : String?, sitemap_priority : String, sitemap_changefreq : String, project_info : ProjectInfo)

View source

.new(program : Program, included_dirs : Array(String))

View source

Methods

#build_flag_lines_from_annotations(context)

View source

#collect_constants(parent)

View source

#collect_subtypes(parent)

View source

#copy_files

View source

#crystal_builtin?(type)

View source

#doc(obj : Type | Method | Macro | Constant)

View source

#doc(context, string)

View source

#fetch_doc_lines(doc : String) : String

View source

#generate_docs_html(program_type, types)

View source

#generate_docs_json(program_type, types)

View source

#generate_flags(string)

Replaces flag keywords with html equivalent

Assumes that flag keywords are at the beginning of respective p element

View source

#generate_readme(program_type, types)

View source

#generate_sitemap(types)

View source

#generate_types_docs(types, dir, all_types)

View source

#has_doc_annotations?(obj)

View source

#isolate_flag_lines(string)

Adds extra line break to flag keyword lines

Guarantees that line is within its own paragraph element when parsed

View source

#macro(type, a_macro)

View source

#method(type, method, class_method)

View source

#must_include?(method : Method)

View source

#must_include?(type : Doc::Type)

View source

#must_include?(a_nil : Nil)

View source

#must_include?(location : Crystal::Location)

View source

#must_include?(a_macro : Doc::Macro)

View source

#must_include?(a_macro : Crystal::Macro)

View source

#must_include?(a_def : Crystal::Def)

View source

#must_include?(type : Crystal::Type)

View source

#must_include?(const : Crystal::Const)

View source

#must_include?(constant : Constant)

View source

#must_include_toplevel?(program_type : Type)

View source

#nodoc?(str : String?) : Bool

View source

#nodoc?(obj)

View source

#program : Program

View source

#program_type

View source

#read_readme

View source

#relative_location(node)

View source

#relative_locations(type)

View source

#summary(obj : Type | Method | Macro | Constant)

View source

#summary(context, string)

View source

#type(type)

View source