Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/marfa/helpers/classes/object.rb
Overview
Object class extending
Instance Method Summary collapse
-
#blank? ⇒ true, false
Copied from rails An object is present if it’s not blank.
-
#present? ⇒ true, false
Object isn’t blank.
Instance Method Details
#blank? ⇒ true, false
Copied from rails An object is present if it’s not blank.
7 8 9 |
# File 'lib/marfa/helpers/classes/object.rb', line 7 def blank? respond_to?(:empty?) ? !!empty? : !self end |
#present? ⇒ true, false
Object isn’t blank
13 14 15 |
# File 'lib/marfa/helpers/classes/object.rb', line 13 def present? !blank? end |