Class: VBulletin
- Inherits:
-
Object
- Object
- VBulletin
- Defined in:
- lib/Olib/utils/vbulletin.rb
Instance Attribute Summary collapse
-
#post ⇒ Object
Returns the value of attribute post.
Class Method Summary collapse
Instance Method Summary collapse
- #add(str) ⇒ Object
- #add_line(str) ⇒ Object
- #close_bold ⇒ Object
- #close_cell ⇒ Object
- #close_color ⇒ Object
- #close_indent ⇒ Object
- #close_italics ⇒ Object
- #close_size ⇒ Object
- #close_table ⇒ Object
- #close_tr ⇒ Object
- #close_underline ⇒ Object
- #enter ⇒ Object
-
#initialize ⇒ VBulletin
constructor
A new instance of VBulletin.
- #open_bold ⇒ Object
- #open_cell ⇒ Object
- #open_color(hexcode) ⇒ Object
- #open_indent ⇒ Object
- #open_italics ⇒ Object
- #open_size(sz) ⇒ Object
- #open_table(width = 500) ⇒ Object
- #open_tr ⇒ Object
- #open_underline ⇒ Object
- #tab ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#post ⇒ Object
Returns the value of attribute post.
2 3 4 |
# File 'lib/Olib/utils/vbulletin.rb', line 2 def post @post end |
Class Method Details
.commafy(n) ⇒ Object
95 96 97 |
# File 'lib/Olib/utils/vbulletin.rb', line 95 def VBulletin.commafy(n) n.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse end |
Instance Method Details
#add(str) ⇒ Object
55 56 57 58 |
# File 'lib/Olib/utils/vbulletin.rb', line 55 def add(str) @post.concat str self end |
#add_line(str) ⇒ Object
59 60 61 62 |
# File 'lib/Olib/utils/vbulletin.rb', line 59 def add_line(str) @post.concat "#{str}\n" self end |
#close_bold ⇒ Object
19 20 21 22 |
# File 'lib/Olib/utils/vbulletin.rb', line 19 def close_bold @post.concat '[/B]' self end |
#close_cell ⇒ Object
47 48 49 50 |
# File 'lib/Olib/utils/vbulletin.rb', line 47 def close_cell @post.concat '[/TD]' self end |
#close_color ⇒ Object
51 52 53 54 |
# File 'lib/Olib/utils/vbulletin.rb', line 51 def close_color @post.concat '[/COLOR]' self end |
#close_indent ⇒ Object
83 84 85 86 |
# File 'lib/Olib/utils/vbulletin.rb', line 83 def close_indent @post.concat "[/INDENT]" self end |
#close_italics ⇒ Object
75 76 77 78 |
# File 'lib/Olib/utils/vbulletin.rb', line 75 def close_italics @post.concat "[/I]" self end |
#close_size ⇒ Object
67 68 69 70 |
# File 'lib/Olib/utils/vbulletin.rb', line 67 def close_size @post.concat "[/SIZE]" self end |
#close_table ⇒ Object
31 32 33 34 |
# File 'lib/Olib/utils/vbulletin.rb', line 31 def close_table @post.concat "[/TABLE]" self end |
#close_tr ⇒ Object
39 40 41 42 |
# File 'lib/Olib/utils/vbulletin.rb', line 39 def close_tr @post.contact "[/TR]" self end |
#close_underline ⇒ Object
15 16 17 18 |
# File 'lib/Olib/utils/vbulletin.rb', line 15 def close_underline @post.concat '[/U]' self end |
#enter ⇒ Object
91 92 93 94 |
# File 'lib/Olib/utils/vbulletin.rb', line 91 def enter @post.concat "\n" self end |
#open_bold ⇒ Object
7 8 9 10 |
# File 'lib/Olib/utils/vbulletin.rb', line 7 def open_bold @post.concat "[B]" self end |
#open_cell ⇒ Object
43 44 45 46 |
# File 'lib/Olib/utils/vbulletin.rb', line 43 def open_cell @post.concat "[TD]" self end |
#open_color(hexcode) ⇒ Object
23 24 25 26 |
# File 'lib/Olib/utils/vbulletin.rb', line 23 def open_color(hexcode) @post.concat "[COLOR=\"#{hexcode}\"]" self end |
#open_indent ⇒ Object
79 80 81 82 |
# File 'lib/Olib/utils/vbulletin.rb', line 79 def open_indent @post.concat "[INDENT]" self end |
#open_italics ⇒ Object
71 72 73 74 |
# File 'lib/Olib/utils/vbulletin.rb', line 71 def open_italics @post.concat"[I]" self end |
#open_size(sz) ⇒ Object
63 64 65 66 |
# File 'lib/Olib/utils/vbulletin.rb', line 63 def open_size(sz) @post.concat "[SIZE=#{sz}]" self end |
#open_table(width = 500) ⇒ Object
27 28 29 30 |
# File 'lib/Olib/utils/vbulletin.rb', line 27 def open_table(width=500) @post.contat "[TABLE=\"width: #{width}\"" self end |
#open_tr ⇒ Object
35 36 37 38 |
# File 'lib/Olib/utils/vbulletin.rb', line 35 def open_tr @post.contact "[TR]" self end |
#open_underline ⇒ Object
11 12 13 14 |
# File 'lib/Olib/utils/vbulletin.rb', line 11 def open_underline @post.concat '[U]' self end |
#tab ⇒ Object
87 88 89 90 |
# File 'lib/Olib/utils/vbulletin.rb', line 87 def tab @post.concat "\t" self end |
#to_s ⇒ Object
98 99 100 |
# File 'lib/Olib/utils/vbulletin.rb', line 98 def to_s @post end |