Module: Avataree::Helper::MonkeyPatches::MonkeyObject

Defined in:
lib/avataree/helper.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


82
83
84
# File 'lib/avataree/helper.rb', line 82

def blank?
  instance_of? Array ? empty? : nil?
end

#presenceObject



90
91
92
# File 'lib/avataree/helper.rb', line 90

def presence
  present? ? self : nil
end

#present?Boolean

Returns:

  • (Boolean)


86
87
88
# File 'lib/avataree/helper.rb', line 86

def present?
  !blank?
end