Sha256: 847837c157651ecf286a20c3f295a4470b361beac55f6e9ebfc9dc7c3f35ac0f
Contents?: true
Size: 739 Bytes
Versions: 70
Compression:
Stored size: 739 Bytes
Contents
# require "eitil_integrate/application_exporter/auto_sum/present_data" module EitilIntegrate::RubyXL module AutoSum class << self # As final step, prepare the data for the excel file, according to formatting requirements. def present_data transform_floats_to_integers transform_values_to_strings set_title end def transform_floats_to_integers @hash.transform_values! { |value| value.is_a?(Float) ? value.safe_to_i.round(3) : value } end def transform_values_to_strings @hash.transform_values! { |value| value&.to_s } end def set_title # @hash[0] = 'Totaal' unless @hash[0] @hash[0] = 'Totaal' end end end end
Version data entries
70 entries across 70 versions & 1 rubygems