Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/bbgun/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
14
15
16
17
18
19
20
# File 'lib/bbgun/string.rb', line 9

def tbbc(conf = nil)
  if !(BBGun.configured?) || conf != nil
     BBGun.configure do |c|
          if conf
              conf.each do |k, v|
                  c.set_from_sym(k,v)
                end
               end
        end
    end
   BBGun.parse(self)
end