Class: Array
Instance Method Summary collapse
- #blank? ⇒ Boolean
-
#list_join(sep = ', ') ⇒ Object
Join an array’s values ignoring blank entries.
Instance Method Details
#blank? ⇒ Boolean
8 9 10 |
# File 'lib/iron/extensions/array.rb', line 8 def blank? empty? end |
#list_join(sep = ', ') ⇒ Object
Join an array’s values ignoring blank entries
4 5 6 |
# File 'lib/iron/extensions/array.rb', line 4 def list_join(sep = ', ') self.select{|e| !e.blank?}.join(sep) end |