Class: String

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

Instance Method Summary collapse

Instance Method Details

#tbbc(conf = nil) ⇒ Object

Allows for “[b]Bold”.tbbc

This method is also configurable, taking the normal configuration options.

"[b]Bold [i]and italic[/i][/b]".tbbc(:strong_enabled => false, :italic_enabled => false)

Will return “[b]Bold [i]and italic[/b]”



9
10
11
12
13
# File 'lib/trainbbcode/string.rb', line 9

def tbbc(conf = nil)
  bbc=TBBC.new
  bbc.conf(conf) if conf
  bbc.parse(self)
end