<commit_before>module SmartAnswer
  class UkBenefitsAbroadFlow < Flow
    def define
      content_id "e1eaf183-1211-4fd7-b439-5c94498814ef"
      name 'uk-benefits-abroad'
      status :published
      satisfies_need "100490"

      exclude_countries = %w(british-antarctic-territory french-guiana guadeloupe holy-see martinique mayotte reunion st-maarten)
      additional_countries = [OpenStruct.new(slug: "jersey", name: "Jersey"), OpenStruct.new(slug: "guernsey", name: "Guernsey")]

      countries_of_former_yugoslavia = %w(bosnia-and-herzegovina kosovo macedonia montenegro serbia).freeze

      # Q1
      multiple_choice :going_or_already_abroad? do
        option :going_abroad
        option :already_abroad
        save_input_as :going_or_already_abroad

        calculate :country_question_title do
          if going_or_already_abroad == "going_abroad"
            "Which country are you moving to?"
          else
            "Which country are you living in?"
          end
        end

        calculate :why_abroad_question_title do
          if going_or_already_abroad == "going_abroad"
            "Why are you going abroad?"
          else
            "Why have you gone abroad?"
          end
        end<commit_msg>Now insert use_erb_templates_for_questions at top of flow<commit_after>module SmartAnswer
  class UkBenefitsAbroadFlow < Flow
    def define
      content_id "e1eaf183-1211-4fd7-b439-5c94498814ef"
      name 'uk-benefits-abroad'
      status :published
      satisfies_need "100490"

      use_erb_templates_for_questions

      exclude_countries = %w(british-antarctic-territory french-guiana guadeloupe holy-see martinique mayotte reunion st-maarten)
      additional_countries = [OpenStruct.new(slug: "jersey", name: "Jersey"), OpenStruct.new(slug: "guernsey", name: "Guernsey")]

      countries_of_former_yugoslavia = %w(bosnia-and-herzegovina kosovo macedonia montenegro serbia).freeze

      # Q1
      multiple_choice :going_or_already_abroad? do
        option :going_abroad
        option :already_abroad
        save_input_as :going_or_already_abroad

        calculate :country_question_title do
          if going_or_already_abroad == "going_abroad"
            "Which country are you moving to?"
          else
            "Which country are you living in?"
          end
        end

        calculate :why_abroad_question_title do
          if going_or_already_abroad == "going_abroad"
            "Why are you going abroad?"
          else
            "Why have you gone abroad?"
          end
        end
{'fraction_non_alphanumeric': 0.06638032018742679, 'fraction_numerical': 0.022647403358063256, 'mean_word_length': 2.6863309352517986, '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': '6710022', 'n_tokens_mistral': 849, 'n_tokens_neox': 791, 'n_words': 184}