Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/stub_requests/core_ext/object/blank.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#blank? ⇒ Boolean
:nodoc:.
-
#presence ⇒ Object
:nodoc:.
-
#present? ⇒ Boolean
:nodoc:.
Instance Method Details
#blank? ⇒ Boolean
:nodoc:
8 9 10 |
# File 'lib/stub_requests/core_ext/object/blank.rb', line 8 def blank? respond_to?(:empty?) ? !!empty? : !self # rubocop:disable Style/DoubleNegation end |
#presence ⇒ Object
:nodoc:
18 19 20 |
# File 'lib/stub_requests/core_ext/object/blank.rb', line 18 def presence self if present? end |
#present? ⇒ Boolean
:nodoc:
13 14 15 |
# File 'lib/stub_requests/core_ext/object/blank.rb', line 13 def present? !blank? end |