Sha256: 01d002dca9cb5369fd34f78739f03c348db4f26f7ec8e35e34c46dd15e6c552e

Contents?: true

Size: 361 Bytes

Versions: 1

Compression:

Stored size: 361 Bytes

Contents

module Moneta
  module Api
    class HTTPException < Exception
      attr_reader :code

      def initialize(code, message)
        super(message)

        @code = code
      end


      def inspect
        "#{ @code }: #{ message }"
      end

      def to_hash
        {
          code: code,
          message: message,
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moneta-api-1.8.0 lib/moneta/api/http_exception.rb