Class: Object

Inherits:
BasicObject
Defined in:
lib/config_layers.rb

Overview

Redefine Object to add a boolean? function.

Instance Method Summary collapse

Instance Method Details

#boolean?Boolean

Simplify boolean test on objects

Returns:

  • (Boolean)


35
36
37
# File 'lib/config_layers.rb', line 35

def boolean?
  self.is_a?(TrueClass) || self.is_a?(FalseClass)
end