Class: EmojiDiffer::Emoji

Inherits:
Struct
  • Object
show all
Includes:
Comparable
Defined in:
lib/emoji_differ/emoji.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/emoji_differ/emoji.rb', line 2

def name
  @name
end

Returns the value of attribute picture_link

Returns:

  • (Object)

    the current value of picture_link



2
3
4
# File 'lib/emoji_differ/emoji.rb', line 2

def picture_link
  @picture_link
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



2
3
4
# File 'lib/emoji_differ/emoji.rb', line 2

def timestamp
  @timestamp
end

Instance Method Details

#<=>(other) ⇒ Object



9
10
11
# File 'lib/emoji_differ/emoji.rb', line 9

def <=>(other)
  name <=> other.name
end

#to_sObject



5
6
7
# File 'lib/emoji_differ/emoji.rb', line 5

def to_s
  ":#{name}:"
end