Class: NRSER::RSpex::List

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

Direct Known Subclasses

Args

Instance Method Summary collapse

Methods inherited from Array

#ellipsis, #extract!, #rest, #to_chainer, #to_digger, #to_message, #to_pair, #to_proc, #to_sender

Methods included from Ext::Tree

#each_branch, #leaves, #map_branches, #map_leaves, #map_tree

Instance Method Details

#to_desc(max = nil) ⇒ Object



185
186
187
188
189
# File 'lib/nrser/rspex.rb', line 185

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