Class: Cheat::Controllers::Responder::Response
- Inherits:
-
Object
- Object
- Cheat::Controllers::Responder::Response
- Defined in:
- lib/cheat/responder.rb
Constant Summary collapse
- TYPES =
{ :yaml => %w[application/yaml text/yaml], :text => %w[text/plain], :html => %w[text/html */* application/html], :xml => %w[application/xml] }
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
Instance Method Summary collapse
-
#initialize(accept) ⇒ Response
constructor
A new instance of Response.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(accept) ⇒ Response
Returns a new instance of Response.
25 |
# File 'lib/cheat/responder.rb', line 25 def initialize(accept) @accept = accept end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
24 25 26 |
# File 'lib/cheat/responder.rb', line 24 def body @body end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
24 25 26 |
# File 'lib/cheat/responder.rb', line 24 def content_type @content_type end |