class WikiSymbol < Chunk::Abstract def self.pattern() /<:(.*?)>/ end attr_accessor :symbol_code def initialize(match_data, revision) super(match_data, revision) @symbol_code = match_data[1] end def unmask(content) tag = case symbol_code when 'cbx' then '' when 'cbxc' then '' else symbol_code end return self if content.gsub!( Regexp.new(mask(content)), tag ) end end