Module: DR::PPHelper

Defined in:
lib/dr/base/utils.rb

Overview

Include this to get less output from pp

Instance Method Summary collapse

Instance Method Details

#exportObject

since we hide the pp value of self, allow to inspect it



75
76
77
78
79
80
81
# File 'lib/dr/base/utils.rb', line 75

def export
	r={}
	instance_variables.sort.each do |var|
		r[var]=instance_variable_get(var)
	end
	r
end

#pretty_print(pp) ⇒ Object

less verbose for pretty_print



69
70
71
72
# File 'lib/dr/base/utils.rb', line 69

def pretty_print(pp)
	info = respond_to?(:to_pp) ? to_pp : to_s
	pp.object_address_group(self) { pp.text " "+info }
end