Class: Alephant::Renderer::Response
- Inherits:
-
Object
- Object
- Alephant::Renderer::Response
- Defined in:
- lib/alephant/renderer/response.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(content) ⇒ Response
constructor
A new instance of Response.
- #to_json ⇒ Object
Constructor Details
#initialize(content) ⇒ Response
Returns a new instance of Response.
8 9 10 |
# File 'lib/alephant/renderer/response.rb', line 8 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
6 7 8 |
# File 'lib/alephant/renderer/response.rb', line 6 def content @content end |
Instance Method Details
#to_json ⇒ Object
12 13 14 |
# File 'lib/alephant/renderer/response.rb', line 12 def to_json ::JSON.generate 'content' => content end |