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_sender

Methods included from Ext::Tree

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

Instance Method Details

#to_desc(max = nil) ⇒ Object



194
195
196
197
198
# File 'lib/nrser/rspex.rb', line 194

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