Module: SvxBox::MarkupGuppy
- Included in:
- SupaBali
- Defined in:
- lib/svxbox/markupguppy.rb
Instance Method Summary collapse
- #goback ⇒ Object
- #humanize(text) ⇒ Object
- #mdlistlink(label, href) ⇒ Object
- #pagetitle(string) ⇒ Object
- #svxbasename(text) ⇒ Object (also: #svxbn)
- #svxprevnext(svxprev, svxnext) ⇒ Object (also: #svxpn)
Instance Method Details
#goback ⇒ Object
10 11 12 |
# File 'lib/svxbox/markupguppy.rb', line 10 def goback '<input type="button" onclick="history.go(-1);" value="Go Back" />' end |
#humanize(text) ⇒ Object
22 23 24 |
# File 'lib/svxbox/markupguppy.rb', line 22 def humanize(text) return text.gsub('_',' ').gsub(/\b\w/){$&.upcase} end |
#mdlistlink(label, href) ⇒ Object
18 19 20 |
# File 'lib/svxbox/markupguppy.rb', line 18 def mdlistlink(label,href) "* [#{label}](#{href})" end |
#pagetitle(string) ⇒ Object
14 15 16 |
# File 'lib/svxbox/markupguppy.rb', line 14 def pagetitle(string) '<h3 id="page-title">' << string << '</h3>' << "\n\n" end |
#svxbasename(text) ⇒ Object Also known as: svxbn
26 27 28 |
# File 'lib/svxbox/markupguppy.rb', line 26 def svxbasename(text) return text.downcase.gsub(' ','_').gsub(/[^a-z0-9_]/,'') end |
#svxprevnext(svxprev, svxnext) ⇒ Object Also known as: svxpn
30 31 32 33 34 |
# File 'lib/svxbox/markupguppy.rb', line 30 def svxprevnext(svxprev,svxnext) npkg = '' npkg << "<span class=\"flrt\"><a href=\"#{svxnext}\">Next ›</a></span>" npkg << "<a href=\"#{svxprev}\">‹ Previous</a>\n\n" end |