Module: CiteProc::Extensions::CompactJoin

Included in:
Array
Defined in:
lib/citeproc/extensions.rb

Instance Method Summary collapse

Instance Method Details

#compact_join(delimiter = ' ') ⇒ Object



65
66
67
# File 'lib/citeproc/extensions.rb', line 65

def compact_join(delimiter = ' ')
  reject { |t| t.nil? || (t.respond_to?(:empty?) && t.empty?) }.join(delimiter)
end