Class: NRSER::RSpex::List

Inherits:
Array
  • Object
show all
Defined in:
lib/nrser/rspex.rb

Instance Method Summary collapse

Instance Method Details

#to_desc(max = nil) ⇒ Object



209
210
211
212
213
# File 'lib/nrser/rspex.rb', line 209

def to_desc max = nil
  return '' if empty?
  max = [16, 64 / self.length].max if max.nil?
  map { |entry| NRSER::RSpex.short_s entry, max }.join ", "
end