<commit_before>require 'ostruct'

module Pombo
  module Services
    @@all_pac = {
      "41106" => OpenStruct.new(code: "41106", max_weight: 30, name: 'PAC', description: I18n.t('services.pac.41106')),
      "41068" => OpenStruct.new(code: "41068", max_weight: 50, name: 'PAC', description: I18n.t('services.pac.41068')),
      "41300" => OpenStruct.new(code: "41300", max_weight: 600, name: 'PAC GF', description: I18n.t('services.pac.41300'))
    }

    @@all_sedex = {
      "40010" => OpenStruct.new(code: "40010", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40010')),
      "40045" => OpenStruct.new(code: "40045", max_weight: 30, name: 'SEDEX a cobrar', description: I18n.t('services.sedex.40045')),
      "40126" => OpenStruct.new(code: "40126", max_weight: 30, name: 'SEDEX a cobrar', description: I18n.t('services.sedex.40126')),
      "40215" => OpenStruct.new(code: "40215", max_weight: 10, name: 'SEDEX 10', description: I18n.t('services.sedex.40215')),
      "40290" => OpenStruct.new(code: "40290", max_weight: 10, name: 'SEDEX hoje', description: I18n.t('services.sedex.40290')),
      "40096" => OpenStruct.new(code: "40096", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40096')),
      "40436" => OpenStruct.new(code: "40436", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40436')),
      "40444" => OpenStruct.new(code: "40444", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40444')),
      "40568" => OpenStruct.new(code: "40568", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40568')),
      "40606" => OpenStruct.new(code: "40606", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40606'))
    }

    @@all_e_sedex = {
      "81019" => OpenStruct.new(code: "81019", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81019')),
      "81027" => OpenStruct.new(code: "81027", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81027')),
      "81035" => OpenStruct.new(code: "81035", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81035')),
      "81868" => OpenStruct.new(code: "81868", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81868')),
      "81833" => OpenStruct.new(code: "81833", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81833')),
      "81850" => OpenStruct.new(code: "81850", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81850'))
    }

    @@all_services = @@all_pac.merge(@@all_sedex).merge(@@all_e_sedex)

    def self.all(service = nil)
      case service
      when :pac
        @@all_pac.values
      when :sedex
        @@all_sedex.values
      when :e_sedex
        @@all_e_sedex.values
      else
        @@all_pac.values + @@all_sedex.values + @@all_e_sedex.values
      end
    end

    def self.find(code)
     @@all_services.values_at(code).first
    end
  end
end<commit_msg>fix services variable<commit_after>require 'ostruct'

module Pombo
  module Services

    def self.all(service = nil)
      case service
      when :pac
        all_pac.values
      when :sedex
        all_sedex.values
      when :e_sedex
        all_e_sedex.values
      else
        all_pac.values + all_sedex.values + all_e_sedex.values
      end
    end

    def self.find(code)
      all_services.values_at(code).first
    end

    private

    def self.all_pac
      {
        "41106" => OpenStruct.new(code: "41106", max_weight: 30, name: 'PAC', description: I18n.t('services.pac.41106')),
        "41068" => OpenStruct.new(code: "41068", max_weight: 50, name: 'PAC', description: I18n.t('services.pac.41068')),
        "41300" => OpenStruct.new(code: "41300", max_weight: 600, name: 'PAC GF', description: I18n.t('services.pac.41300'))
      }
    end

    def self.all_sedex
      {
        "40010" => OpenStruct.new(code: "40010", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40010')),
        "40045" => OpenStruct.new(code: "40045", max_weight: 30, name: 'SEDEX a cobrar', description: I18n.t('services.sedex.40045')),
        "40126" => OpenStruct.new(code: "40126", max_weight: 30, name: 'SEDEX a cobrar', description: I18n.t('services.sedex.40126')),
        "40215" => OpenStruct.new(code: "40215", max_weight: 10, name: 'SEDEX 10', description: I18n.t('services.sedex.40215')),
        "40290" => OpenStruct.new(code: "40290", max_weight: 10, name: 'SEDEX hoje', description: I18n.t('services.sedex.40290')),
        "40096" => OpenStruct.new(code: "40096", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40096')),
        "40436" => OpenStruct.new(code: "40436", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40436')),
        "40444" => OpenStruct.new(code: "40444", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40444')),
        "40568" => OpenStruct.new(code: "40568", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40568')),
        "40606" => OpenStruct.new(code: "40606", max_weight: 30, name: 'SEDEX', description: I18n.t('services.sedex.40606'))
      }
    end

    def self.all_e_sedex
      {
        "81019" => OpenStruct.new(code: "81019", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81019')),
        "81027" => OpenStruct.new(code: "81027", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81027')),
        "81035" => OpenStruct.new(code: "81035", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81035')),
        "81868" => OpenStruct.new(code: "81868", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81868')),
        "81833" => OpenStruct.new(code: "81833", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81833')),
        "81850" => OpenStruct.new(code: "81850", max_weight: 15, name: 'E-SEDEX', description: I18n.t('services.e_sedex.81850'))
      }
    end

    def self.all_services
      all_pac.merge(all_sedex).merge(all_e_sedex)
    end
  end
end
{'fraction_non_alphanumeric': 0.18137174660337207, 'fraction_numerical': 0.11916844000654772, 'mean_word_length': 3.8300395256916997, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 41, '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': '6472493', 'n_tokens_mistral': 2798, 'n_tokens_neox': 2327, 'n_words': 440}