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



71
72
73
74
75
76
77
# File 'lib/dr/base/utils.rb', line 71

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



65
66
67
68
# File 'lib/dr/base/utils.rb', line 65

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