-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed extra calls to constantize and DRY'd the code.
- Loading branch information
Yohan Robert
committed
Mar 8, 2016
1 parent
f8d2aab
commit 580139f
Showing
3 changed files
with
38 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module ActiveModel | ||
class Serializer | ||
module Adapter | ||
class FragmentCache | ||
attr_reader :serializer | ||
|
||
def initialize(adapter, serializer, options) | ||
@instance_options = options | ||
@adapter = adapter | ||
@serializer = serializer | ||
end | ||
|
||
# 1. Create a CachedSerializer and NonCachedSerializer from the serializer class | ||
# 2. Serialize the above two with the given adapter | ||
# 3. Pass their serializations to the adapter +::fragment_cache+ | ||
def fetch | ||
|
||
end | ||
|
||
protected | ||
|
||
attr_reader :instance_options, :adapter | ||
|
||
private | ||
|
||
|
||
|
||
|
||
|
||
def to_valid_const_name(name) | ||
name.gsub('::', '_') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.