Class: Functional::Compact
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #compact_fun(*a) ⇒ Object (also: #call)
Methods inherited from Base
#base_fun, #clean, #end, #initialize, #to_proc
Constructor Details
This class inherits a constructor from Functional::Base
Instance Method Details
#compact_fun(*a) ⇒ Object Also known as: call
114 115 116 |
# File 'lib/functional.rb', line 114 def compact_fun *a @next.call *a unless a.empty? || [nil] == a end |