lib/fit4ruby/Activity.rb
def write(io, id_mapper)
      @file_id.write(io, id_mapper)
      @file_creator.write(io, id_mapper)

      (@field_descriptions + @developer_data_ids +
       @device_infos + @sensor_settings +
       @data_sources + @user_profiles +
       @physiological_metrics + @events +
       @sessions + @laps + @records + @heart_rate_zones +
       @personal_records).sort.each do |s|
        s.write(io, id_mapper)
      end
      super
    end
def write(io, id_mapper)
      @file_id.write(io, id_mapper)
      @file_creator.write(io, id_mapper)

      (@field_descriptions + @developer_data_ids +
       @device_infos + @sensor_settings +
       @data_sources + @user_profiles +
       @physiological_metrics + @events +
       @sessions + @laps + @records + @heart_rate_zones +
       @personal_records).sort.each do |s|
        s.write(io, id_mapper)
      end
      super
    end
Write the Activity data to a file.
 @param io [IO] File reference
 @param id_mapper [FitMessageIdMapper] Maps global FIT record types to
        local ones.