File: attributes.rb

package info (click to toggle)
ruby-active-model-serializers 0.10.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,752 kB
  • sloc: ruby: 13,138; sh: 53; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module ActiveModel
  class Serializer
    module Adapter
      class Attributes < DelegateClass(ActiveModelSerializers::Adapter::Attributes)
        def initialize(serializer, options = {})
          super(ActiveModelSerializers::Adapter::Attributes.new(serializer, options))
        end
        class << self
          extend ActiveModelSerializers::Deprecate
          deprecate :new, 'ActiveModelSerializers::Adapter::Json.'
        end
      end
    end
  end
end