Class: TanukiEmoji::CodepointAlreadyIndexedError

Inherits:
Error
  • Object
show all
Defined in:
lib/tanuki_emoji/errors.rb

Overview

Error: An Emoji with the same codepoints has been previously indexed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, codepoint) ⇒ CodepointAlreadyIndexedError

Returns a new instance of CodepointAlreadyIndexedError.

Parameters:

  • name (String)
  • codepoint (String)


29
30
31
32
33
34
35
36
37
# File 'lib/tanuki_emoji/errors.rb', line 29

def initialize(name, codepoint)
  @name = name
  @codepoint = codepoint

  message = "Cannot index '#{name}' Emoji with codepoint: '#{codepoint}'. " \
    "An Emoji with that codepoint has already been indexed."

  super(message)
end

Instance Attribute Details

#codepointsObject (readonly)

Returns the value of attribute codepoints.



25
26
27
# File 'lib/tanuki_emoji/errors.rb', line 25

def codepoints
  @codepoints
end

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/tanuki_emoji/errors.rb', line 25

def name
  @name
end