module Spruz::Full
def full?(dispatch = nil, *args)
given by dispatch is called on the object. This is the same as
argument +dispatch+ was given and the object wasn't blank the method
blank, the block is executed with the object as its first argument. If an
returns nil. If a block was given as an argument and the object isn't
Returns the object if it isn't blank (as in Object#blank?), otherwise it
def full?(dispatch = nil, *args) if blank? obj = nil #elsif Module === dispatch # TODO # dispatch.found?(self) elsif dispatch obj = __send__(dispatch, *args) obj = nil if obj.blank? else obj = self end if block_given? and obj yield obj else obj end end