Class: TanukiEmoji::AlphaCodeAlreadyIndexedError

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

Overview

Error: An Emoji with the same alpha code has been previously indexed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, alpha_code) ⇒ AlphaCodeAlreadyIndexedError

Returns a new instance of AlphaCodeAlreadyIndexedError.

Parameters:

  • name (String)
  • alpha_code (String)


12
13
14
15
16
17
18
19
20
# File 'lib/tanuki_emoji/errors.rb', line 12

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

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

  super(message)
end

Instance Attribute Details

#alpha_codeObject (readonly)

Returns the value of attribute alpha_code.



8
9
10
# File 'lib/tanuki_emoji/errors.rb', line 8

def alpha_code
  @alpha_code
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/tanuki_emoji/errors.rb', line 8

def name
  @name
end