Sha256: fde91997d5949ca1bf82f38689861fac0115277d9a138c4e18df7732d719f47e

Contents?: true

Size: 277 Bytes

Versions: 25

Compression:

Stored size: 277 Bytes

Contents

module JSONAPI
  class OperationResult
    attr_accessor :code, :errors, :resource

    def initialize(code, resource = nil, errors = [])
      @code = code
      @resource = resource
      @errors = errors
    end

    def has_errors?
      errors.count > 0
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
jsonapi-resources-0.3.3 lib/jsonapi/operation_result.rb
jsonapi-resources-0.3.2 lib/jsonapi/operation_result.rb
jsonapi-resources-0.3.1 lib/jsonapi/operation_result.rb
jsonapi-resources-0.3.0 lib/jsonapi/operation_result.rb
jsonapi-resources-0.3.0.pre2 lib/jsonapi/operation_result.rb
jsonapi-resources-0.3.0.pre1 lib/jsonapi/operation_result.rb
jsonapi-resources-0.2.0 lib/jsonapi/operation_result.rb
jsonapi-resources-0.1.1 lib/jsonapi/operation_result.rb
jsonapi-resources-0.1.0 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.16 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.15 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.14 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.13 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.12 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.11 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.10 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.9 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.8 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.7 lib/jsonapi/operation_result.rb
jsonapi-resources-0.0.6 lib/jsonapi/operation_result.rb