<commit_before>#########################################################
# <NAME> : <EMAIL>
# Mobile Devices 2014
#########################################################


module UserApis
  module Mdi
    module Storage

      # @api private
      class CollectionDefinitionsMappingClass

        def initialize(apis)
          @user_apis = apis
        end

        def user_api
          @user_apis
        end

        # return a collection definition structs array
        def get_all()
          @all_definitions ||= RagentApi::CollectionDefinitionMapping.get_all(user_api.account)
        end

        def get_for_asset_with_type(imei, type)
          asset_definitions = []
          definitions = self.get_all()

          definitions.each do |definition|
            if (definition['assets'] == [] || definition['assets'].include?(imei)) && definition.['collects'].include?(type)
              asset_definitions << definition
            end
          end
          asset_definitions
        end
      end

    end #Storage
  end #Mdi<commit_msg>Fix syntax error<commit_after>#########################################################
# <NAME> : <EMAIL>
# Mobile Devices 2014
#########################################################


module UserApis
  module Mdi
    module Storage

      # @api private
      class CollectionDefinitionsMappingClass

        def initialize(apis)
          @user_apis = apis
        end

        def user_api
          @user_apis
        end

        # return a collection definition structs array
        def get_all()
          @all_definitions ||= RagentApi::CollectionDefinitionMapping.get_all(user_api.account)
        end

        def get_for_asset_with_type(imei, type)
          asset_definitions = []
          definitions = self.get_all()

          definitions.each do |definition|
            if (definition['assets'] == [] || definition['assets'].include?(imei)) && definition['collects'].include?(type)
              asset_definitions << definition
            end
          end
          asset_definitions
        end
      end

    end #Storage
  end #Mdi
{'fraction_non_alphanumeric': 0.18100189035916825, 'fraction_numerical': 0.003780718336483932, 'mean_word_length': 2.3926282051282053, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '371621', 'n_tokens_mistral': 542, 'n_tokens_neox': 517, 'n_words': 121}