1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-06-15 14:47:53 +02:00

Update rdoc

This commit is contained in:
Rico Sta. Cruz 2017-08-27 23:27:41 +08:00
parent e366c7d71d
commit c99467b22f
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
2 changed files with 59 additions and 30 deletions

View File

@ -4,27 +4,32 @@
## Notes
H2's support these:
`h2` supports these:
{: .-two-column}
{: .-three-column}
{: .-left-reference}
H3's support these:
`h3` supports these:
{: .-prime}
Tables support these:
`table` supports these:
{: .-shortcuts}
Pre's support these:
`pre` supports these:
{: .-setup}
`ul` supports these:
{: .-also-see}
Each sheet supports these metadata:
```yml
---
title: React.js
category: React
layout: 2017/sheet # 'default' | '2017/sheet'

76
rdoc.md
View File

@ -1,6 +1,7 @@
---
title: Rdoc
category: Markup
layout: 2017/sheet
---
### Basic RDoc format
@ -17,31 +18,45 @@ category: Markup
# @see http://url.com
#
# @return [true] if so
#
# == Definition lists
#
# list:: hi.
# +foo+:: parameterized
#
# == Definition lists
# [foo] also
# [bar] like this
### Inline
*bold*
_emphasized_
+code+
```
*bold*
_emphasized_
+code+
```
http://www.link.com
See Models::User@Examples
{Google}[http://google.com]
```
http://www.link.com
See Models::User@Examples
{Google}[http://google.com]
```
### Skip
def input # :nodoc:
```rb
def input # :nodoc:
```
module MyModule # :nodoc: all
```rb
module MyModule # :nodoc: all
```
### Definition lists
```
# == Definition lists
#
# list:: hi.
# +foo+:: parameterized
```
```
# == Definition lists
# [foo] also
# [bar] like this
```
### Return types
@ -65,17 +80,26 @@ category: Markup
### Sections
# :section: Expiry methods
# methods relating to expiring
```rb
# :section: Expiry methods
# methods relating to expiring
def expire!
def expired?
...
def expire!
def expired?
...
```
### Using tomdoc
# :markup: TomDoc
# at the beginning ofthe file
```
# :markup: TomDoc
```
http://rdoc.rubyforge.org/RDoc/Markup.html
http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md
Plase this at the beginning of the file.
## Also see
{: .-one-column}
* <http://rdoc.rubyforge.org/RDoc/Markup.html>
* <http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md>
{: .-also-see}