class VBulletin

Attributes

post[RW]

Public Class Methods

commafy(n) click to toggle source
# 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
new() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 3
def initialize
  @post = String.new
  self
end

Public Instance Methods

add(str) click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 55
def add(str)
  @post.concat str
  self
end
add_line(str) click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 59
def add_line(str)
  @post.concat "#{str}\n"
  self
end
close_bold() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 19
def close_bold
  @post.concat '[/B]'
  self
end
close_cell() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 47
def close_cell
  @post.concat '[/TD]'
  self
end
close_color() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 51
def close_color
  @post.concat '[/COLOR]'
  self
end
close_indent() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 83
def close_indent
  @post.concat "[/INDENT]"
  self
end
close_italics() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 75
def close_italics
  @post.concat "[/I]"
  self
end
close_size() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 67
def close_size
  @post.concat "[/SIZE]"
  self
end
close_table() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 31
def close_table
  @post.concat "[/TABLE]"
  self
end
close_tr() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 39
def close_tr
  @post.contact "[/TR]"
  self
end
close_underline() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 15
def close_underline
  @post.concat '[/U]'
  self
end
enter() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 91
def enter
  @post.concat "\n"
  self
end
open_bold() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 7
def open_bold
  @post.concat "[B]"
  self
end
open_cell() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 43
def open_cell
  @post.concat "[TD]"
  self
end
open_color(hexcode) click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 23
def open_color(hexcode)
  @post.concat "[COLOR=\"#{hexcode}\"]"
  self
end
open_indent() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 79
def open_indent
  @post.concat "[INDENT]"
  self
end
open_italics() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 71
def open_italics
  @post.concat"[I]"
  self
end
open_size(sz) click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 63
def open_size(sz)
  @post.concat "[SIZE=#{sz}]"
  self
end
open_table(width=500) click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 27
def open_table(width=500)
  @post.contat "[TABLE=\"width: #{width}\""
  self
end
open_tr() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 35
def open_tr
  @post.contact "[TR]"
  self
end
open_underline() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 11
def open_underline
  @post.concat '[U]'
  self
end
tab() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 87
def tab
  @post.concat "\t"
  self
end
to_s() click to toggle source
# File lib/Olib/utils/vbulletin.rb, line 98
def to_s
  @post
end