Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#wiki_boldObject



12
13
14
# File 'lib/ext/string.rb', line 12

def wiki_bold
  "'''" + self + "'''"
end

#wiki_italicObject



8
9
10
# File 'lib/ext/string.rb', line 8

def wiki_italic
  "''" + self + "''"
end

#wiki_preObject



2
3
4
5
6
# File 'lib/ext/string.rb', line 2

def wiki_pre
  lines.map do |line|
    ' ' + line
  end.join
end

#wiki_td(options = {}) ⇒ Object



16
17
18
# File 'lib/ext/string.rb', line 16

def wiki_td(options={})
  wiki_table_element '|', options
end

#wiki_th(options = {}) ⇒ Object



20
21
22
# File 'lib/ext/string.rb', line 20

def wiki_th(options={})
  wiki_table_element '!', options
end