Module: Ore::Template::Helpers::RDoc
- Defined in:
- lib/ore/template/helpers/rdoc.rb
Overview
Instance Method Summary collapse
-
#h1(title) ⇒ String
Emits a RDoc h1 heading.
-
#h2(title) ⇒ String
Emits a RDoc h2 heading.
-
#h3(title) ⇒ String
Emits a RDoc h3 heading.
-
#h4(title) ⇒ String
Emits a RDoc h4 heading.
-
#image(url, alt = nil) ⇒ String
Emits a RDoc image.
-
#link_to(text, url) ⇒ String
Emits a RDoc link.
-
#pre(code) { ... } ⇒ String
Emits a RDoc code block.
Instance Method Details
#h1(title) ⇒ String
Emits a RDoc h1 heading.
43 44 45 |
# File 'lib/ore/template/helpers/rdoc.rb', line 43 def h1(title) "= #{title}" end |
#h2(title) ⇒ String
Emits a RDoc h2 heading.
54 55 56 |
# File 'lib/ore/template/helpers/rdoc.rb', line 54 def h2(title) "== #{title}" end |
#h3(title) ⇒ String
Emits a RDoc h3 heading.
65 66 67 |
# File 'lib/ore/template/helpers/rdoc.rb', line 65 def h3(title) "=== #{title}" end |
#h4(title) ⇒ String
Emits a RDoc h4 heading.
76 77 78 |
# File 'lib/ore/template/helpers/rdoc.rb', line 76 def h4(title) "==== #{title}" end |
#image(url, alt = nil) ⇒ String
Emits a RDoc image.
32 33 34 |
# File 'lib/ore/template/helpers/rdoc.rb', line 32 def image(url,alt=nil) "{#{alt}}[rdoc-image:#{url}]" end |
#link_to(text, url) ⇒ String
Emits a RDoc link.
19 20 21 |
# File 'lib/ore/template/helpers/rdoc.rb', line 19 def link_to(text,url) "{#{text}}[#{url}]" end |
#pre(code) { ... } ⇒ String
Emits a RDoc code block.
90 91 92 |
# File 'lib/ore/template/helpers/rdoc.rb', line 90 def pre(code) code.each_line.map { |line| " #{line}" }.join end |