Class: Megingiard::EmojiNode

Inherits:
Object
  • Object
show all
Defined in:
lib/megingiard/emoji_node.rb

Overview

A leaf node representing an emoji

Instance Method Summary collapse

Constructor Details

#initialize(emoji_name) ⇒ EmojiNode

Returns a new instance of EmojiNode.



8
9
10
# File 'lib/megingiard/emoji_node.rb', line 8

def initialize(emoji_name)
  @emoji = EMOJIS.fetch(emoji_name)
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/megingiard/emoji_node.rb', line 12

def to_s
  @emoji
end