Sha256: a144099271ad702fefde031d00f39b5334ddea0151d2d83a628fe16677a5bbe5
Contents?: true
Size: 693 Bytes
Versions: 8
Compression:
Stored size: 693 Bytes
Contents
require 'csv' module Mondrian::REST::Formatters module CSV def self.call(result, env) params = env['api.endpoint'].params add_parents = params['parents'] debug = params['debug'] sparse = params['sparse'] properties = params['properties'] || [] rows = Mondrian::REST::Formatters.tidy(result, add_parents: add_parents, debug: debug, properties: properties, sparse: sparse) ::CSV.generate do |csv| rows.each { |row| csv << row } end end end end
Version data entries
8 entries across 8 versions & 1 rubygems