<commit_before># frozen_string_literal: true

require_relative 'signup'

module RestoreStrategies
  # Objectification of the API's opportunity
  class Opportunity < ApiObject
    attr_reader :name, :type, :featured, :description, :location,
                :items_committed, :items_given, :max_items_needed, :ongoing,
                :organization, :instructions, :gift_question, :days,
                :group_types, :issues, :regions, :supplies, :skills,
                :municipalities

    @path = '/api/opportunities'

    def initialize(json:, response:)
      json['links'].each do |link|
        @signup_href = link['href'] if link['rel'] == 'signup'
      end
      super(json: json, response: response)
    end

    def self.where(params)
      items_from_response(RestoreStrategies.client.search(params))
    end
  end
end<commit_msg>Adds closed to attr_reader<commit_after># frozen_string_literal: true

require_relative 'signup'

module RestoreStrategies
  # Objectification of the API's opportunity
  class Opportunity < ApiObject
    attr_reader :name, :type, :featured, :description, :location,
                :items_committed, :items_given, :max_items_needed, :ongoing,
                :organization, :instructions, :gift_question, :days,
                :group_types, :issues, :regions, :supplies, :skills,
                :municipalities, :closed

    @path = '/api/opportunities'

    def initialize(json:, response:)
      json['links'].each do |link|
        @signup_href = link['href'] if link['rel'] == 'signup'
      end
      super(json: json, response: response)
    end

    def self.where(params)
      items_from_response(RestoreStrategies.client.search(params))
    end
  end
end
{'fraction_non_alphanumeric': 0.10994152046783626, 'fraction_numerical': 0.0, 'mean_word_length': 3.203931203931204, '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': '1350884', 'n_tokens_mistral': 542, 'n_tokens_neox': 511, 'n_words': 123}