Sha256: add1b08eea8f67be813b4573297ba389d4e6835dd8e78105a40d0bd5adb2a3b1

Contents?: true

Size: 322 Bytes

Versions: 8

Compression:

Stored size: 322 Bytes

Contents

# frozen_string_literal: true

module ActiveModelSerializers
  module JsonPointer
    module_function

    POINTERS = {
      attribute:    '/data/attributes/%s'.freeze,
      primary_data: '/data%s'.freeze
    }.freeze

    def new(pointer_type, value = nil)
      format(POINTERS[pointer_type], value)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
active_model_serializers-0.10.15 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.14 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.13 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.12 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.11 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.10 lib/active_model_serializers/json_pointer.rb
active_model_serializers_custom-0.10.90 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.9 lib/active_model_serializers/json_pointer.rb