Class: RuleString

Inherits:
GformatString show all
Defined in:
lib/models/gformat_string.rb

Constant Summary collapse

RULES =
{"*" => "</b>", "+" => "</u>"}

Instance Method Summary collapse

Methods inherited from GformatString

#to_html_format

Instance Method Details

#formatObject



47
48
49
50
51
52
53
54
55
# File 'lib/models/gformat_string.rb', line 47

def format
  @content = self
  unescape_rule = generate_unescape_rule
  escape_rule = generate_escape_rule(unescape_rule)
  escape(escape_rule)
  convert
  escape(unescape_rule)
  return @content
end