Method: Stupidedi::Values::LoopVal#pretty_print
- Defined in:
- lib/stupidedi/values/loop_val.rb
#pretty_print(q) ⇒ void
This method returns an undefined value.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/stupidedi/values/loop_val.rb', line 42 def pretty_print(q) id = @definition.try do |d| ansi.bold("[#{d.id.to_s}]") end q.text(ansi.loop("LoopVal#{id}")) q.group(2, "(", ")") do q.breakable "" @children.each do |e| unless q.current_group.first? q.text "," q.breakable end q.pp e end end end |