lib/remo.rb
# Converts all emoticons in +string+ to HTML-image tags.
Converts all emoticons in +string+ to HTML-image tags.
Converts all emoticons in + string + to HTML - image tags .
def to_html
    @emoticons.each do |regexp, image|
      @string.gsub!(Regexp.new("(^|\s)(#{regexp})(\s|$)"), " <img src='#{@options[:images_path]}#{@options[:theme]}/#{image}'/> ")
    end
    @options[:extras].each do |regexp, image|
      @string.gsub!(Regexp.new("(^|\s)(#{regexp})(\s|$)"), " <img src='#{@options[:images_path]}extras/#{image}'/> ")
    end
    @string
  end
def to_html @emoticons . each do | regexp , image | @string . gsub! ( Regexp . new ( "(^|\s)(#{regexp})(\s|$)" ) , " <img src='#{@options[:images_path]}#{@options[:theme]}/#{image}'/> " ) end @options [ :extras ] . each do | regexp , image | @string . gsub! ( Regexp . new ( "(^|\s)(#{regexp})(\s|$)" ) , " <img src='#{@options[:images_path]}extras/#{image}'/> " ) end @string end
Converts all emoticons in +string+ to HTML-image tags.
Converts all emoticons in + string + to HTML - image tags .