Sha256: 132f8fc2918a76df37f4d684f5962592e54dabb983002bbb9ec3cd7afd58f519

Contents?: true

Size: 656 Bytes

Versions: 6

Compression:

Stored size: 656 Bytes

Contents

module JSONAPI
  class Error
    attr_accessor :title, :detail, :id, :href, :code, :source, :links, :status

    def initialize(options = {})
      @title          = options[:title]
      @detail         = options[:detail]
      @id             = options[:id]
      @href           = options[:href]
      @code           = if JSONAPI.configuration.use_text_errors
                          TEXT_ERRORS[options[:code]]
                        else
                          options[:code]
                        end
      @source         = options[:source]
      @links          = options[:links]
      @status         = options[:status]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jsonapi-resources-0.5.5 lib/jsonapi/error.rb
jsonapi-resources-0.5.4 lib/jsonapi/error.rb
jsonapi-resources-0.5.3 lib/jsonapi/error.rb
jsonapi-resources-0.5.2 lib/jsonapi/error.rb
jsonapi-resources-0.5.1 lib/jsonapi/error.rb
jsonapi-resources-0.5.0 lib/jsonapi/error.rb