@@ -12,12 +12,12 @@ def initialize(adapter, serializer, options)
12
12
13
13
# TODO: Use Serializable::Resource
14
14
# TODO: call +constantize+ less
15
- # 1. Create a CachedSerializer and NonCachedSerializer from the serializer class.
16
- # 2. Serialize the above two with the given adapter.
17
- # 3. Pass their serializations to the adapter +::fragment_cache+.
15
+ # 1. Create a CachedSerializer and NonCachedSerializer from the serializer class
16
+ # 2. Serialize the above two with the given adapter
17
+ # 3. Pass their serializations to the adapter +::fragment_cache+
18
18
def fetch
19
19
klass = serializer . class
20
- # It will split the serializer into two, one that will be cached and other wont
20
+ # It will split the serializer into two, one that will be cached and one that will not
21
21
serializers = fragment_serializer ( serializer . object . class . name , klass )
22
22
23
23
# Instantiate both serializers
@@ -41,9 +41,9 @@ def fetch
41
41
42
42
private
43
43
44
- # Given a serializer class and a hash of its cached and non0cached serializers
45
- # 1. Determine cached attributes from serializer class options.
46
- # 2. Add cached attributes to cached Serializer.
44
+ # Given a serializer class and a hash of its cached and non-cached serializers
45
+ # 1. Determine cached attributes from serializer class options
46
+ # 2. Add cached attributes to cached Serializer
47
47
# 3. Add non-cached attributes to non-cached Serializer
48
48
def cached_attributes ( klass , serializers )
49
49
attributes = serializer . class . _attributes
@@ -66,8 +66,8 @@ def cached_attributes(klass, serializers)
66
66
end
67
67
68
68
# Given a resource name and its serializer's class
69
- # 1. Dyanmically creates a CachedSerializer and NonCachedSerializer
70
- # for a given class 'name'.
69
+ # 1. Dyanmically creates a CachedSerializer and NonCachedSerializer
70
+ # for a given class 'name'
71
71
# 2. Call
72
72
# CachedSerializer.cache(serializer._cache_options)
73
73
# CachedSerializer.fragmented(serializer)
0 commit comments