Module | Spruz::Full |
In: |
lib/spruz/xt/full.rb
|
Returns the object if it isn‘t blank (as in Object#blank?), otherwise it returns nil. If a block was given as an argument and the object isn‘t blank, the block is executed with the object as its first argument. If an argument dispatch was given and the object wasn‘t blank the method given by dispatch is called on the object. This is the same as foo.full?(&:bar) in the previous block form.