You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: default_attributes_value_builder.rb
    path of file: ./repos/ekylibre/app/services/activity_productions
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module ActivityProductions
  # Build activity production default values
  class DefaultAttributesValueBuilder
    def initialize(activity, campaign)
      @activity = activity
      @campaign = campaign
    end

    def self.build(activity, campaign)
      new(activity, campaign).build
    end

    # @return [Hash] attributes
    def build
      {
        usage: usage,
        started_on
    
      def stopped_on
        if activity.production_stopped_on.present? && activity.life_duration.present?
          activity.production_stopped_on.change(year: started_on.year + activity.life_duration )
        elsif activity.production_stopped_on.present? && activity.production_stopped_on_year.present?
          activity.production_stopped_on.change(year: campaign.harvest_year + activity.production_stopped_on_year)
        elsif activity.life_duration.present?
          (Date.today - 1.day).change(year: campaign.harvest_year + activity.life_duration)
        else
          (Date.today - 1.day).change(year: campaign.harvest_year + 1)
        end