Module: MonkeyPatch::Object

Defined in:
lib/monkey-patch/object.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/monkey-patch/object.rb', line 3

def blank?
  respond_to?(:empty?) ? empty? : !self
end

#present?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/monkey-patch/object.rb', line 7

def present?
  !blank?
end