Method: Cantor::AbsoluteSet#pretty_print
- Defined in:
- lib/cantor/absolute_set.rb
#pretty_print(q) ⇒ void
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/cantor/absolute_set.rb', line 210 def pretty_print(q) q.text("AbsoluteSet[#{size}/#{@universe.size}]") q.group(2, "(", ")") do q.breakable "" elements = to_a elements.take(5).each do |e| unless q.current_group.first? q.text "," q.breakable end q.pp e end if elements.length > 5 q.text "," q.breakable q.text "..." end end end |