123456789_123456789_123456789_123456789_123456789_

Class: Struct

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/pp.rb

Instance Method Summary

Instance Method Details

#pretty_print(q)

[ GitHub ]

  
# File 'lib/pp.rb', line 404

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

#pretty_print_cycle(q)

[ GitHub ]

  
# File 'lib/pp.rb', line 418

def pretty_print_cycle(q) # :nodoc:
  q.text sprintf("#<struct %s:...>", PP.mcall(self, Kernel, :class).name)
end