Method: MARCSpec::MultiValueMap#asPPString

Defined in:
lib/marcspec/multivaluemap.rb

#asPPStringObject

Produce a string suitable for pretty-printing. Unfortunately, we need to just plain delete the procs before doing so



110
111
112
113
114
115
116
117
118
119
# File 'lib/marcspec/multivaluemap.rb', line 110

def asPPString
  map = @map.reject {|kv| kv[1].is_a? Proc}
  s = StringIO.new
  s.print "{\n :maptype=>:multi,\n :mapname=>"
  PP.singleline_pp(@mapname, s)
  s.print ",\n :map => "
  PP.pp(map, s)
  s.puts "\n}"
  return s.string
end