Card Card
String → String → String → List[Param] → List[Example] → Card
Parameters
- String name
- String description
- String category
- List[Param] params
- List[Example] examples
Returns
Card
Case class that holds documentation information.
See also:
Card("new","creates a new instance of the DocGen class","DocGen",List(
Param("String","name","(project name)",ParamType.INPUT),
Param("String","version","(project version)",ParamType.INPUT),
Param("DocGen","","",ParamType.OUTPUT)
),List(
Example(
"new DocGen("Docs4s","v0.0.1")\n"
" .withLinks(links) \n"
" .withCards(cards) \n"
" .withPages(pages) \n"
" .generate() \n"
)
)));
Example Example
String → Example
Parameters
- String code
Returns
Example
Case class that holds example info.
Example("val doc = new DocGen(\"Docs4s\",\"v0.0.1\")")
generate void
generates the html files
Link Link
String → String → String → Link
Parameters
- String text
- String url
- String active (leave blank if link is not the active page, otherwise use text 'active')
Returns
Link
Link("Home","home.html")
new DocGen
String → String → String → DocGen
Parameters
- String name (project name)
- String version (project version)
- String githubUrl (base url to github branch e.g. master)
Returns
DocGen
Creates a new instance of the DocGen class.
new DocGen("Docs4s","v0.0.1")
.withLinks(links)
.withCards(cards)
.withPages(pages)
.generate()
Param Param
String → String → String → ParamType → Param
Parameters
- String type
- String id
- String description
- ParamType ParamType
Returns
Param
Param("String","name","(project name)",ParamType.INPUT)
ParamType ParamType
ParamType
Parameters
Returns
ParamType
(ParamType.INPUT,ParamType.OUTPUT)
Case class that holds parameter type info for params.
See also:
Param("String","name","(project name)",ParamType.INPUT)
withCards DocGen
List[Card] → DocGen
Parameters
- List[Card] cards (a list of Card case classes)
Returns
DocGen
val cards = List(
Card("new","Creates a new instance of the DocGen class.","DocGen",List(
Param("String","name","(project name)",ParamType.INPUT),
Param("String","version","(project version)",ParamType.INPUT),
Param("DocGen","","",ParamType.OUTPUT)
),List(
Example(
"new DocGen("Docs4s","v0.0.1")\n"
" .withLinks(links) \n"
" .withCards(cards) \n"
" .withPages(pages) \n"
" .generate() \n"
)
),List(Link("Card","#Card"))));
new DocGen("Docs4s","v0.0.1").withCards(cards)
withLinks DocGen
List[Link] → DocGen
Parameters
- List[Link] links (a list of Link case classes)
Returns
DocGen
Sets the links on the top navbar.
See also:
val links = List(
Link("Home","home.html"),
Link("Documentation","#","active"),
Link("Github","https://github.com/kingsleyh/docs4s")
)
new DocGen("Docs4s","v0.0.1").withLinks(links)
withPages DocGen
List[Page] → DocGen
Parameters
- List[Page] pages (a list of Page case classes)
Returns
DocGen
val pages = List(
Page("home.html","Home",List(
Link("Home","home.html","active"),
Link("Documentation","documentation.html"),
Link("Github","https://github.com/kingsleyh/docs4s")
),"README.md")
)