Class: NRSER::RSpex::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
211
212
213
214
215
216
217
218
219
220
221
222
|
# File 'lib/nrser/rspex.rb', line 211
def to_desc max = nil
return '()' if empty?
if last.is_a?( Hash )
[
List.new( self[0..-2] ).to_desc,
Opts[ last ].to_desc,
].reject( &:empty? ).join( ", " )
else
super
end
end
|