File: symbol_ext.rb

package info (click to toggle)
ruby-emot 0.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 184 kB
  • sloc: ruby: 1,069; makefile: 3
file content (11 lines) | stat: -rw-r--r-- 194 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
module Emot
  module SymbolExt
    def ~
      to_s.split
      .map { |word| Emot.icon(word) || word.sub(/^\./, '') }
      .join(" ")
    end
  end
end

Symbol.send(:include, Emot::SymbolExt)