Sha256: 960cc1e255e5475ec433cd98b34665a469bfbc3652e7285961f784a8f3d42ebf

Contents?: true

Size: 1.01 KB

Versions: 9

Compression:

Stored size: 1.01 KB

Contents

=begin
#nlpapiv2

#The powerful Natural Language Processing APIs (v2) let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.

OpenAPI spec version: v1

Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.1

=end

module CloudmersiveNlpApiClient
  class ApiError < StandardError
    attr_reader :code, :response_headers, :response_body

    # Usage examples:
    #   ApiError.new
    #   ApiError.new("message")
    #   ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
    #   ApiError.new(:code => 404, :message => "Not Found")
    def initialize(arg = nil)
      if arg.is_a? Hash
        if arg.key?(:message) || arg.key?('message')
          super(arg[:message] || arg['message'])
        else
          super arg
        end

        arg.each do |k, v|
          instance_variable_set "@#{k}", v
        end
      else
        super arg
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cloudmersive-nlp-api-client-2.0.9 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.8 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.7 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.6 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.5 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.4 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.3 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.2 ./lib/cloudmersive-nlp-api-client/api_error.rb
cloudmersive-nlp-api-client-2.0.1 ./lib/cloudmersive-nlp-api-client/api_error.rb