Class: Object

Inherits:
BasicObject
Defined in:
lib/engage/core_ext/blank.rb

Overview

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

:nodoc:

Returns:

  • (Boolean)
[View source]

3
4
5
# File 'lib/engage/core_ext/blank.rb', line 3

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

#presenceObject

[View source]

9
10
11
# File 'lib/engage/core_ext/blank.rb', line 9

def presence
  self if present?
end

#present?Boolean

Returns:

  • (Boolean)
[View source]

6
7
8
# File 'lib/engage/core_ext/blank.rb', line 6

def present?
  !blank?
end