Class: Object

Inherits:
BasicObject
Defined in:
lib/doing/good.rb

Overview

Object helpers

Instance Method Summary collapse

Instance Method Details

#good?Boolean

Tests if object is nil or empty

Returns:

  • (Boolean)

    true if object is defined and has content



20
21
22
# File 'lib/doing/good.rb', line 20

def good?
  !nil? && !self&.empty? || false
end