Class: Object

Inherits:
BasicObject
Defined in:
lib/core_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#is_an?(type) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
5
6
7
# File 'lib/core_ext/object.rb', line 2

def is_an? type
  # you should be able to use correct grammar
  # for your type checking
  # 2.is_an? Integer is *so* much better than 2.is_a? Integer
  is_a? type
end