Class: Object

Inherits:
BasicObject
Defined in:
lib/rbot/irc.rb

Instance Method Summary collapse

Instance Method Details

#nil_or_empty?Boolean

We extend the Object class with a method that checks if the receiver is nil or empty

Returns:

  • (Boolean)


43
44
45
46
47
# File 'lib/rbot/irc.rb', line 43

def nil_or_empty?
  return true unless self
  return true if self.respond_to? :empty? and self.empty?
  return false
end