Sha256: c48cb225d61605b4faccc178f7c5bd080c6443e574877d84c12bff5caf1fb987

Contents?: true

Size: 420 Bytes

Versions: 24

Compression:

Stored size: 420 Bytes

Contents

module ThreeScale
  class Response
    def success!
      @error_code = nil
      @error_message = nil
    end

    def error!(message, code = nil)
      @error_code = code
      @error_message = message
    end

    def success?
      @error_code.nil? && @error_message.nil?
    end
 
    # System error code.
    attr_reader :error_code

    # Human readable error message.
    attr_reader :error_message  
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
3scale_client-2.11.0 lib/3scale/response.rb
3scale_client-2.10.0 lib/3scale/response.rb
3scale_client-2.9.0 lib/3scale/response.rb
3scale_client-2.8.2 lib/3scale/response.rb
3scale_client-2.8.1 lib/3scale/response.rb
3scale_client-2.8.0 lib/3scale/response.rb
3scale_client-2.7.0 lib/3scale/response.rb
3scale_client-2.6.1 lib/3scale/response.rb
3scale_client-2.6.0 lib/3scale/response.rb
3scale_client-2.5.0 lib/3scale/response.rb
3scale_client-2.5.0.pre1 lib/3scale/response.rb
3scale_client-2.4.2 lib/3scale/response.rb
3scale_client-2.4.0 lib/3scale/response.rb
3scale_client-2.4.0.pre.1 lib/3scale/response.rb
3scale_client-2.3.4 lib/3scale/response.rb
3scale_client-2.3.3 lib/3scale/response.rb
3scale_client-2.3.2 lib/3scale/response.rb
3scale_client-2.3.1 lib/3scale/response.rb
3scale_client-2.3.0 lib/3scale/response.rb
3scale_client-2.2.10 lib/3scale/response.rb