<commit_before>require 'body_media/consumption/summary'
require 'body_media/burn/summary'
require 'body_media/sleep/summary'
require 'body_media/step/summary'

module BodyMedia
  class Summary
    attr_accessor :last_sync, :start_date, :end_date

    def initialize(summary)
      @summary = summary

      self.last_sync = @summary['lastSync']
      self.start_date = Date.parse(@summary['startDate'])
      self.end_date = Date.parse(@summary['endDate'])

      # start_date.upto(end_date).each do |date|
      #   day = BodyMedia::Day.new(date)

      #   [:sleep, :consumption, :burn, :step].each do |service|
      #     data = summary[service.to_s.camelize(:lower)]['days'].find {|summary_day| Date.parse(summary_day['date']) == date}
      #     day.send(service).update(data)
    #   end

      #   @days << day
      # end
    end

    def date_range
      start_date..end_date
    end

    def sleep
      @sleep ||= BodyMedia::Sleep::Summary.new(@summary['sleep'])
    end

    def consumption
      @consumption ||= BodyMedia::Consumption::Summary.new(@summary['consumption'])
    end

    def burn
      @burn ||= BodyMedia::Burn::Summary.new(@summary['burn'])
    end

    def step
      @step ||= BodyMedia::Step::Summary.new(@summary['step'])
    end
  end
end<commit_msg>remove commented out code<commit_after>require 'body_media/consumption/summary'
require 'body_media/burn/summary'
require 'body_media/sleep/summary'
require 'body_media/step/summary'

module BodyMedia
  class Summary
    attr_accessor :last_sync, :start_date, :end_date

    def initialize(summary)
      @summary = summary

      self.last_sync = @summary['lastSync']
      self.start_date = Date.parse(@summary['startDate'])
      self.end_date = Date.parse(@summary['endDate'])
    end

    def date_range
      start_date..end_date
    end

    def sleep
      @sleep ||= BodyMedia::Sleep::Summary.new(@summary['sleep'])
    end

    def consumption
      @consumption ||= BodyMedia::Consumption::Summary.new(@summary['consumption'])
    end

    def burn
      @burn ||= BodyMedia::Burn::Summary.new(@summary['burn'])
    end

    def step
      @step ||= BodyMedia::Step::Summary.new(@summary['step'])
    end
  end
end
{'fraction_non_alphanumeric': 0.1396294622684139, 'fraction_numerical': 0.0, 'mean_word_length': 3.375494071146245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5597881', 'n_tokens_mistral': 706, 'n_tokens_neox': 683, 'n_words': 129}