Class: HalApi::Representer::Caches::SerializedJson
- Inherits:
-
Object
- Object
- HalApi::Representer::Caches::SerializedJson
- Defined in:
- lib/hal_api/representer/caches/serialized_json.rb
Overview
Wrapper for string that is already json inspired by: grosser.it/2013/10/16/compiled-json-for-partially-cached-json-response-precompiled-handlebar-templates/
Instance Method Summary collapse
-
#initialize(s) ⇒ SerializedJson
constructor
A new instance of SerializedJson.
- #to_json(*args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(s) ⇒ SerializedJson
Returns a new instance of SerializedJson.
4 |
# File 'lib/hal_api/representer/caches/serialized_json.rb', line 4 def initialize(s); @s = s; end |
Instance Method Details
#to_json(*args) ⇒ Object
5 |
# File 'lib/hal_api/representer/caches/serialized_json.rb', line 5 def to_json(*args); @s; end |
#to_s ⇒ Object
6 |
# File 'lib/hal_api/representer/caches/serialized_json.rb', line 6 def to_s; @s; end |