<commit_before>module Api
  module V2
    module Measures
      class MeasureLegalActSerializer
        include FastJsonapi::ObjectSerializer

        set_type :legal_act

        set_id :regulation_id

        attributes :validity_start_date, :validity_end_date, :officialjournal_number,
                   :officialjournal_page, :published_date

        attribute :regulation_code do |regulation|
          ApplicationHelper.regulation_code(regulation)
        end

        attribute :regulation_url do |regulation|
          ApplicationHelper.regulation_url(regulation)
        end
      end
    end
  end
end<commit_msg>fixed undifined published_date method for MeasurePartialTemporaryStop<commit_after>module Api
  module V2
    module Measures
      class MeasureLegalActSerializer
        include FastJsonapi::ObjectSerializer

        set_type :legal_act

        set_id :regulation_id

        attributes :validity_start_date, :validity_end_date, :officialjournal_number,
                   :officialjournal_page

        attribute :published_date do |regulation|
          regulation.try(:published_date)
        end
        
        attribute :regulation_code do |regulation|
          ApplicationHelper.regulation_code(regulation)
        end

        attribute :regulation_url do |regulation|
          ApplicationHelper.regulation_url(regulation)
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.04357142857142857, 'fraction_numerical': 0.0014285714285714286, 'mean_word_length': 2.638961038961039, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4939090', 'n_tokens_mistral': 379, 'n_tokens_neox': 340, 'n_words': 81}