# File lib/marc/xmlreader.rb, line 160 def self.choose_parser(p) match = false self.constants.each do | const | next unless const.to_s.match("^USE_") if self.const_get(const) == p match = true return p end end raise ArgumentError.new("Parser '#{p}' not defined") unless match end