<commit_before>module RakutenWebService
  class Recipe < Resource

    def self.large_categories
      categories('large')
    end

    def self.medium_categories
      categories('medium')
    end

    def self.small_categories
      categories('small')
    end

    def self.categories(category_type)
      @categories ||= {}
      @categories[category_type] = if @categories[category_type]
                                     @categories[category_type]
                                   else
                                     Category.search(category_type: category_type).response['result'][category_type].map do |category|
                                       Category.new(category)
                                     end
                                   end
    end

    class Category < Resource
      endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20121121'

      attribute :categoryId, :categoryName, :categoryUrl, :parentCategoryId

      def parent_category
        Category.new(categoryId: parent_category_id)
      end
    end
  end
end<commit_msg>Make Recipe.search protected<commit_after>module RakutenWebService
  class Recipe < Resource

    def self.large_categories
      categories('large')
    end

    def self.medium_categories
      categories('medium')
    end

    def self.small_categories
      categories('small')
    end

    def self.categories(category_type)
      @categories ||= {}
      @categories[category_type] = if @categories[category_type]
                                     @categories[category_type]
                                   else
                                     Category.search(category_type: category_type).response['result'][category_type].map do |category|
                                       Category.new(category)
                                     end
                                   end
    end

    class << self
      protected :search
    end

    class Category < Resource
      endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20121121'

      attribute :categoryId, :categoryName, :categoryUrl, :parentCategoryId

      def parent_category
        Category.new(categoryId: parent_category_id)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07275953859804792, 'fraction_numerical': 0.00709849157054126, 'mean_word_length': 1.6877234803337307, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3301741', 'n_tokens_mistral': 572, 'n_tokens_neox': 532, 'n_words': 108}