lib/mediawiki-hana/application.rb
# Ensure that only one rendering mode has been specified
Ensure that only one rendering mode has been specified
Ensure that only one rendering mode has been specified
def enforce_mutually_exclusive_rendering_modes(argv)
			render_opts = ["--text", "--json", "--csv"]
			num_rendering_options = 0
			argv.each { |a| num_rendering_options += 1 if render_opts.index(a) }
			raise ArgumentError, "Please specify a single rendering mode" unless num_rendering_options <= 1
		end
def enforce_mutually_exclusive_rendering_modes ( argv ) render_opts = [ "--text" , "--json" , "--csv" ] num_rendering_options = 0 argv . each { | a | num_rendering_options += 1 if render_opts . index ( a ) } raise ArgumentError , "Please specify a single rendering mode" unless num_rendering_options <= 1 end
Ensure that only one rendering mode has been specified
Ensure that only one rendering mode has been specified
argv
<not_specific>