Method: InvisibleCollector::Response#presence
- Defined in:
- lib/invisible_collector/response.rb
#presence ⇒ Object
Returns the content of the response if the request was successful otherwise return nil
. response.presence
is equivalent to
response.present? ? response.content : nil
26 27 28 |
# File 'lib/invisible_collector/response.rb', line 26 def presence @content if success? end |