--- !ruby/object:RI::ClassDescription attributes: [] class_methods: - !ruby/object:RI::MethodSummary name: ansi - !ruby/object:RI::MethodSummary name: ansi_to_bbcode - !ruby/object:RI::MethodSummary name: ansi_to_html - !ruby/object:RI::MethodSummary name: bbcode_to_ansi - !ruby/object:RI::MethodSummary name: bbcode_to_html - !ruby/object:RI::MethodSummary name: html_to_ansi - !ruby/object:RI::MethodSummary name: html_to_bbcode - !ruby/object:RI::MethodSummary name: strip_bbcode comment: - !ruby/struct:SM::Flow::H level: 1 text: BBCode - !ruby/struct:SM::Flow::P body: The BBCode module helps ease the separation of core and frontend with the core (or submodules) being still able to say, what colors shall be used in it's responses. This is achieved by encoding formatting information using the BBCode tokens. This enables you to "pipe" layout information such as colors, style, fonttype, size and alignment through the core to the frontend. - !ruby/struct:SM::Flow::P body: Additionally it converts markups/codes between ANSI, HTML and BBCode almost freely ;) - !ruby/struct:SM::Flow::H level: 2 text: Usage - !ruby/struct:SM::Flow::VERB body: " # Converting a bbcode string to ANSI and XHTML\n\n str = "this is [COLOR=red]red[/COLOR], this is [B]bold[/B]"\n print( BBCode.bbcode_to_ansi(str) )\n print( BBCode.bbcode_to_html(str) )\n" constants: - !ruby/object:RI::Constant comment: - !ruby/struct:SM::Flow::P body: ANSIname => ANSIcode LUT name: ANSINAME2CODE value: "{ \"reset\" => \"\\e[0m\", \"bold\" => \"\\e[1m\", \"underline\" => \"\\e[4m\", \"blink\" => \"\\e[5m\", \"reverse\" => \"\\e[7m\", \"invisible\" => \"\\e[8m\", \"black\" => \"\\e[0;30m\", \"darkgrey\" => \"\\e[1;30m\", \"red\" => \"\\e[0;31m\", \"lightred\" => \"\\e[1;31m\", \"green\" => \"\\e[0;32m\", \"lightgreen\" => \"\\e[1;32m\", \"brown\" => \"\\e[0;33m\", \"yellow\" => \"\\e[1;33m\", \"blue\" => \"\\e[0;34m\", \"lightblue\" => \"\\e[1;34m\", \"purple\" => \"\\e[0;35m\", \"magenta\" => \"\\e[1;35m\", \"cyan\" => \"\\e[1;36m\", \"lightcyan\" => \"\\e[1;36m\", \"grey\" => \"\\e[0;37m\", \"white\" => \"\\e[1;37m\", \"bgblack\" => \"\\e[40m\", \"bgred\" => \"\\e[41m\", \"bggreen\" => \"\\e[42m\", \"bgyellow\" => \"\\e[43m\", \"bgblue\" => \"\\e[44m\", \"bgmagenta\" => \"\\e[45m\", \"bgcyan\" => \"\\e[46m\", \"bgwhite\" => \"\\e[47m\"" - !ruby/object:RI::Constant comment: - !ruby/struct:SM::Flow::P body: BBColor => ANSIname LUT name: BBCOLOR2ANSI value: "{ \"skyblue\" => \"blue\", \"royalblue\" => \"blue\", \"blue\" => \"blue\", \"darkblue\" => \"blue\", \"orange\" => \"red\", \"orangered\" => \"red\", \"crimson\" => \"red\", \"red\" => \"lightred\", \"firebrick\" => \"red\", \"darkred\" => \"red\", \"green\" => \"green\", \"limegreen\" => \"green\", \"seagreen\" => \"green\", \"darkgreen\" => \"green\", \"deeppink\" => \"magenta\", \"tomato\" => \"red\", \"coral\" => \"cyan\", \"purple\" => \"purple\", \"indigo\" => \"blue\", \"burlywood\" => \"red\", \"sandybrown\"=> \"red\", \"sierra\" => \"sierra\", \"chocolate\" => \"brown\", \"teal\" => \"teal\", \"silver\" => \"white\", \"black\" => \"black\", \"yellow\" => \"yellow\", \"magenta\" => \"magenta\", \"cyan\" => \"cyan\", \"white\" => \"white\"" - !ruby/object:RI::Constant comment: - !ruby/struct:SM::Flow::P body: ANSInames => BBCode LUT name: ANSINAME2BBCODE value: "{ \"bold\" => \"B\", \"underline\" => \"U\", \"reverse\" => \"I\", \"red\" => \"COLOR=red\", \"blue\" => \"COLOR=blue\", \"green\" => \"COLOR=green\", \"cyan\" => \"COLOR=cyan\", \"magenta\"=> \"COLOR=deeppink\", \"purple\" => \"COLOR=purple\", \"black\" => \"COLOR=black\", \"white\" => \"COLOR=white\", \"yellow\" => \"COLOR=yellow\", \"brown\" => \"COLOR=chocolate\"" full_name: BBCode includes: [] instance_methods: [] name: BBCode superclass: