<commit_before>require "fog/core/deprecated_connection_accessors"

module Fog
  class Model

    extend Fog::Attributes::ClassMethods
    include Fog::Attributes::InstanceMethods
    include Fog::Core::DeprecatedConnectionAccessors

    attr_accessor :collection
    attr_reader :service

    def initialize(new_attributes = {})
      # TODO Remove compatibility with old connection option
      @service = @service || new_attributes.delete(:service)
      if @service.nil? && new_attributes[:connection]
        Fog::Logger.deprecation("Passing :connection option is deprecated, use :service instead [light_black](#{caller.first})[/]")
        @service = new_attributes[:connection]
      end<commit_msg>[core] Fix service instance variable being included when doing model.to_json<commit_after>require "fog/core/deprecated_connection_accessors"

module Fog
  class Model

    extend Fog::Attributes::ClassMethods
    include Fog::Attributes::InstanceMethods
    include Fog::Core::DeprecatedConnectionAccessors

    attr_accessor :collection
    attr_reader :service

    def initialize(new_attributes = {})
      # TODO Remove compatibility with old connection option
      @service = new_attributes.delete(:service)
      if @service.nil? && new_attributes[:connection]
        Fog::Logger.deprecation("Passing :connection option is deprecated, use :service instead [light_black](#{caller.first})[/]")
        @service = new_attributes[:connection]
      end
{'fraction_non_alphanumeric': 0.09582477754962354, 'fraction_numerical': 0.0, 'mean_word_length': 4.601532567049809, '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': '4187917', 'n_tokens_mistral': 385, 'n_tokens_neox': 375, 'n_words': 93}