Class: ViewModel::Controller::CompiledJson
- Inherits:
-
Object
- Object
- ViewModel::Controller::CompiledJson
- Defined in:
- lib/view_model/controller.rb
Overview
Wrap raw JSON in such a way that MultiJSON knows to pass it through untouched. Requires a MultiJson adapter other than ActiveSupport’s (modified) JsonGem.
Instance Method Summary collapse
-
#initialize(s) ⇒ CompiledJson
constructor
A new instance of CompiledJson.
- #to_json(*_args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(s) ⇒ CompiledJson
Returns a new instance of CompiledJson.
155 156 157 |
# File 'lib/view_model/controller.rb', line 155 def initialize(s) @s = s end |
Instance Method Details
#to_json(*_args) ⇒ Object
159 160 161 |
# File 'lib/view_model/controller.rb', line 159 def to_json(*_args) @s end |
#to_s ⇒ Object
163 164 165 |
# File 'lib/view_model/controller.rb', line 163 def to_s @s end |