Module: ActiveModelSerializers::JsonPointer

Defined in:
lib/active_model_serializers/json_pointer.rb

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

.new(pointer_type, value = nil) ⇒ Object


10
11
12
# File 'lib/active_model_serializers/json_pointer.rb', line 10

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