# File lib/ice_cube/builders/string_builder.rb, line 15
    def to_s
      string = @base || ''
      @types.each do |type, segments|
        if f = self.class.formatter(type)
          current = f.call(segments)
        else
          next if segments.empty?
          current = self.class.sentence(segments)
        end
        f = IceCube::I18n.t('ice_cube.string.format')[type] ? type : 'default'
        string = IceCube::I18n.t("ice_cube.string.format.#{f}", rest: string, current: current)
      end
      string
    end