<commit_before># -*- coding: utf-8 -*-
module Specinfra
  class Ec2Metadata
    def initialize
      @base_uri = 'http://169.254.169.254/latest/meta-data/'
      @metadata = {}
    end

    def get
      @metadata = get_metadata
      self
    end

    def [](key)
      if @metadata[key].nil?
        begin
          require "specinfra/ec2_metadata/#{key}"
          inventory_class = Specinfra::Ec2Metadata.const_get(key.to_camel_case)
          @metadata[key] = inventory_class.get<commit_msg>Avoid error on symbols<commit_after># -*- coding: utf-8 -*-
module Specinfra
  class Ec2Metadata
    def initialize
      @base_uri = 'http://169.254.169.254/latest/meta-data/'
      @metadata = {}
    end

    def get
      @metadata = get_metadata
      self
    end

    def [](key)
      if @metadata[key].nil?
        begin
          require "specinfra/ec2_metadata/#{key}"
          inventory_class = Specinfra::Ec2Metadata.const_get(key.to_s.to_camel_case)
          @metadata[key] = inventory_class.get
{'fraction_non_alphanumeric': 0.12027833001988071, 'fraction_numerical': 0.03180914512922465, 'mean_word_length': 2.3234323432343236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4486214', 'n_tokens_mistral': 347, 'n_tokens_neox': 320, 'n_words': 62}