Class: Struct
Overview
:nodoc:
Instance Method Summary collapse
-
#pretty_print(q) ⇒ Object
:nodoc:.
-
#pretty_print_cycle(q) ⇒ Object
:nodoc:.
Instance Method Details
#pretty_print(q) ⇒ Object
:nodoc:
392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/pp.rb', line 392 def pretty_print(q) # :nodoc: q.group(1, sprintf("#<struct %s", PP.mcall(self, Kernel, :class).name), '>') { q.seplist(PP.mcall(self, Struct, :members), lambda { q.text "," }) {|member| q.breakable q.text member.to_s q.text '=' q.group(1) { q.breakable '' q.pp self[member] } } } end |