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



175
176
177
178
179
# File 'lib/nrser/rspex.rb', line 175

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