Method: Emojidex::Emoji#initialize
- Defined in:
- lib/emojidex/emoji.rb
#initialize(details = {}) ⇒ Emoji
Returns a new instance of Emoji.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/emojidex/emoji.rb', line 11 def initialize(details = {}) @moji = details[:moji] @code, @code_ja = details[:code], details[:code_ja] @unicode, @full_name = details[:unicode], details[:full_name] @emoticon = details[:emoticon] @category = details[:category] ? details[:category].to_sym : :other @tags = details[:tags].map { |tag| tag.to_sym } unless details[:tags].nil? @link = details[:link] @is_wide = details[:is_wide] end |