<commit_before>require "nokogiri"
require "wasabi/resolver"
require "wasabi/parser"

module Wasabi

  # = Wasabi::Document
  #
  # Represents a WSDL document.
  class Document

    # Accepts a WSDL +document+ to parse.
    def initialize(document = nil)
      self.document = document
    end

    attr_accessor :document, :request, :xml

    alias_method :document?, :document

    # Returns the SOAP endpoint.
    def endpoint
      @endpoint ||= parser.endpoint
    end

    # Sets the SOAP endpoint.
    attr_writer :endpoint

    # Returns the target namespace.
    def target_namespace
      @target_namespace ||= parser.target_namespace
    end

    # Sets the target namespace.
    attr_writer :target_namespace

    # Returns a list of available SOAP actions.
    def soap_actions
      @soap_actions ||= parser.operations.keys
    end

    # Returns the SOAP action for a given +key+.
    def soap_action(key)
      operations[key][:action] if operations[key]
    end

    # Returns the SOAP input for a given +key+.
    def soap_input(key)
      operations[key][:input] if operations[key]
    end

    # Returns a map of SOAP operations.
    def operations
      @operations ||= parser.operations
    end

    # Returns the service name.
    def service_name
      @service_name ||= parser.service_name
    end

    attr_writer :service_name

    def namespaces
      parser.namespaces
    end

    # XXX: legacy interface. change savon to use the new types interface.<commit_msg>removed shortcuts from Document<commit_after>require "nokogiri"
require "wasabi/resolver"
require "wasabi/parser"

module Wasabi

  # = Wasabi::Document
  #
  # Represents a WSDL document.
  class Document

    # Accepts a WSDL +document+ to parse.
    def initialize(document = nil)
      self.document = document
    end

    attr_accessor :document, :request, :xml

    alias_method :document?, :document

    # Returns the SOAP endpoint.
    def endpoint
      @endpoint ||= parser.endpoint
    end

    # Sets the SOAP endpoint.
    attr_writer :endpoint

    # Returns the target namespace.
    def target_namespace
      @target_namespace ||= parser.target_namespace
    end

    # Sets the target namespace.
    attr_writer :target_namespace

    # Returns a list of available SOAP actions.
    def soap_actions
      @soap_actions ||= parser.operations.keys
    end

    # Returns a map of SOAP operations.
    def operations
      @operations ||= parser.operations
    end

    # Returns the service name.
    def service_name
      @service_name ||= parser.service_name
    end

    attr_writer :service_name

    def namespaces
      parser.namespaces
    end

    # XXX: legacy interface. change savon to use the new types interface.
{'fraction_non_alphanumeric': 0.07088052612349288, 'fraction_numerical': 0.0, 'mean_word_length': 2.7302452316076296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3181868', 'n_tokens_mistral': 799, 'n_tokens_neox': 762, 'n_words': 256}