Sha256: ed07e59a234b364e6ae557e68261107dbe570c19ee305de43d243879d8b8074b

Contents?: true

Size: 291 Bytes

Versions: 13

Compression:

Stored size: 291 Bytes

Contents

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

13 entries across 13 versions & 2 rubygems

Version Path
active_model_serializers-0.10.8 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.7 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.6 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.5 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.4 lib/active_model_serializers/json_pointer.rb
agi_active_model_serializers-0.10.9 lib/active_model_serializers/json_pointer.rb
agi_active_model_serializers-0.10.8 lib/active_model_serializers/json_pointer.rb
agi_active_model_serializers-0.10.7 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.3 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.2 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.1 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.0 lib/active_model_serializers/json_pointer.rb
active_model_serializers-0.10.0.rc5 lib/active_model_serializers/json_pointer.rb