Class: Array

Inherits:
Object show all
Defined in:
lib/iron/extensions/array.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (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