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

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

Case class that holds parameter info.

See also:

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

Specifies the documentation for each item.

See also:

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)
        

withPages DocGen

List[Page] → DocGen
Parameters
  • List[Page] pages (a list of Page case classes)
Returns DocGen

Specifies additional pages.

See also:

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")
)