Class: Numeric

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

Overview

An adjustment to the Numeric class.

Instance Method Summary collapse

Instance Method Details

#===(target) ⇒ Void

Note:

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

Numerics 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/numeric_alt.rb', line 9

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