Sha256: 384ae416d699f2e25f236012a7b4bf877ebac60c0a302c813e50dae2c931f1a6
Contents?: true
Size: 589 Bytes
Versions: 43
Compression:
Stored size: 589 Bytes
Contents
require "emot/version" require "emot/map" require "emot/symbol_ext" require "emot/cli" module Emot def icon(name) build_icon( MAP[name.intern] ) end alias :emoji :icon def unicode(name) build_unicode( MAP[name.intern] ) end def list Hash[ MAP.map do |name, codes| [name, [build_icon(codes), build_unicode(codes)]] end.sort_by(&:last) ] end private def build_icon(codes) codes.pack("U*") if codes end def build_unicode(codes) codes.map { |code| "U+#{code.to_s(16).upcase}" }.join(" ") if codes end extend self end
Version data entries
43 entries across 28 versions & 2 rubygems
Version | Path |
---|---|
emot-0.0.4 | lib/emot.rb |
emot-0.0.3 | lib/emot.rb |
emot-0.0.2 | lib/emot.rb |