In Files

  • pp.rb

Struct

Public Instance Methods

pretty_print(q) click to toggle source
 
               # File pp.rb, line 370
def pretty_print(q)
  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
            
pretty_print_cycle(q) click to toggle source
 
               # File pp.rb, line 384
def pretty_print_cycle(q)
  q.text sprintf("#<struct %s:...>", PP.mcall(self, Kernel, :class).name)
end