lib/mediawiki-hana/application.rb
# Get the appropriate object to render based on the render mode
Get the appropriate object to render based on the render mode
Get the appropriate object to render based on the render mode
def render_object
			case @params[:render_mode]
			when :text
				Hana::PlainText.new(@wiki_query, @params[:data_to_render])
			when :csv
				Hana::CSV.new(@wiki_query, @params[:data_to_render])
			when :json
				Hana::JsonOutput.new(@wiki_query)
			end
		end
def render_object case @params [ :render_mode ] when :text Hana :: PlainText . new ( @wiki_query , @params [ :data_to_render ] ) when :csv Hana :: CSV . new ( @wiki_query , @params [ :data_to_render ] ) when :json Hana :: JsonOutput . new ( @wiki_query ) end end
Get the appropriate object to render based on the render mode
Get the appropriate object to render based on the render mode