Class: UrlString

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

Instance Method Summary collapse

Methods inherited from GformatString

#to_html_format

Instance Method Details

#formatObject



40
41
42
# File 'lib/models/gformat_string.rb', line 40

def format
  return self.gsub(/\[link:(.+?)\](.+?)\[\/link\]/, '<a target="_blank" style="color:#2894FF" href=\2>\1</a>')
end