Class: Symbol

Inherits:
Object show all
Defined in:
tomes/alterations/symbol_alt.rb

Overview

An adjustment to the Symbol class.

Instance Method Summary collapse

Instance Method Details

#===(target) ⇒ Void

Note:

This change is required for the Keyboard class to function properly.

Symbols will check for instances of themselves when compared to an Array. Otherwise, this method behaves normally.

Parameters:

Returns:

  • (Void)


9
10
11
12
13
14
15
16
# File 'tomes/alterations/symbol_alt.rb', line 9

def ===(target)
  case target
  when ::Array
    target.include?(self)
  else
    super
  end
end