source/Emoji/gemoji-parser/lib/gemoji-parser.rb
# Parses all emoticon symbols within a string.
# - Block: performs all symbol transformations.
Parses all emoticon symbols within a string.
Block: performs all symbol transformations.
Parses all emoticon symbols within a string . Block : performs all symbol transformations .
def parse_emoticons(text)
    text.gsub(emoticon_regex) do |match|
      if emoticons.has_key?($1)
        emoji = Emoji.find_by_alias(emoticons[$1].to_s)
        block_given? && emoji ? yield(emoji) : match
      else
        match
      end
    end
  end
def parse_emoticons ( text ) text . gsub ( emoticon_regex ) do | match | if emoticons . has_key? ( $1 ) emoji = Emoji . find_by_alias ( emoticons [ $1 ] . to_s ) block_given? && emoji ? yield ( emoji ) : match else match end end end
Parses all emoticon symbols within a string.
Parses all emoticon symbols within a string .
text