<commit_before>module GhostinspectorRuby
  class Client
    API_SUBHOST = 'api'
    API_VERSION = 'v1'
    DEFAULT_OPTIONS = {
      :site => 'ghostinspector.com'
    }

    attr_accessor :options

    def initialize(options={})
      store_options(options)
      raise ArgumentError, "At least a client_id or an access_token must be present" if api_key.nil?
    end


    def api_key
      @options[:api_key]
    end

    def site
      @options[:site]
    end

    def webhook_url
      @options[:webhook_url]
    end

    alias host site

    def api_host
      [API_SUBHOST, host].join('.')
    end

    def store_options(options={})
      @options ||= DEFAULT_OPTIONS.dup
      @options.merge!(options)
    end

# Method to find result by id
    def result id
      Result.new id,api_key
    end

# Methods for tests
    def test
      @test ||= Test.new api_key,webhook_url
    end
# Method for suite
    def suite
      Suite.new api_key
    end
  end<commit_msg>change calling method of test<commit_after>module GhostinspectorRuby
  class Client

    attr_accessor :options

    def initialize(options={})
      store_options(options)
      raise ArgumentError, "At least a client_id or an access_token must be present" if api_key.nil?
    end


    def api_key
      @options[:api_key]
    end


    def webhook_url
      @options[:webhook_url]
    end

    alias host site

    def api_host
      [API_SUBHOST, host].join('.')
    end

    def store_options(options={})
      @options ||= DEFAULT_OPTIONS.dup
      @options.merge!(options)
    end

# Method to find result by id
    def result id
      Result.new id,api_key
    end

# Methods for tests
    def test(webhook_url=nil)
      @test ||= Test.new api_key,webhook_url
    end
# Method for suite
    def suite
      Suite.new api_key
    end
  end
{'fraction_non_alphanumeric': 0.07815079801871216, 'fraction_numerical': 0.000550357732526142, 'mean_word_length': 2.436672967863894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7536930', 'n_tokens_mistral': 602, 'n_tokens_neox': 579, 'n_words': 166}