Class: NilClass

Inherits:
Object
  • Object
show all
Defined in:
lib/core_extensions.rb

Overview

Add an empty method to nil. Now no need for if x and x.empty?. Just x.empty?

Instance Method Summary collapse

Instance Method Details

#empty?Boolean


3
4
5
# File 'lib/core_extensions.rb', line 3

def empty?
  true
end