Skip to content

Commit ba4e112

Browse files
TrevorHinesleyshishirmk
authored andcommitted
Since attributes are an instantiated class now, renamed AttributeSerializer to Attribute
1 parent 5c82069 commit ba4e112

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module FastJsonapi
2-
class AttributeSerializer
2+
class Attribute
33
attr_reader :key, :method, :conditional_proc
44

55
def initialize(key:, method:, options: {})

lib/fast_jsonapi/object_serializer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'active_support/core_ext/object'
44
require 'active_support/concern'
55
require 'active_support/inflector'
6-
require 'fast_jsonapi/attribute_serializer'
6+
require 'fast_jsonapi/attribute'
77
require 'fast_jsonapi/serialization_core'
88

99
module FastJsonapi
@@ -156,7 +156,7 @@ def attributes(*attributes_list, &block)
156156
attributes_list.each do |attr_name|
157157
method_name = attr_name
158158
key = run_key_transform(method_name)
159-
attributes_to_serialize[key] = AttributeSerializer.new(
159+
attributes_to_serialize[key] = Attribute.new(
160160
key: key,
161161
method: block || method_name,
162162
options: options

0 commit comments

Comments
 (0)