Class: Mack::Response
- Defined in:
- lib/mack/controller/response.rb
Overview
Right now Mack::Response is just a wrapper around Rack::Response. Down the line this may be used to spice up the response.
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
Instance Method Summary collapse
- #assigns(key) ⇒ Object
- #attachment=(file_name) ⇒ Object
- #content_type ⇒ Object
- #content_type=(type) ⇒ Object
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
6 7 8 |
# File 'lib/mack/controller/response.rb', line 6 def controller @controller end |
Instance Method Details
#assigns(key) ⇒ Object
8 9 10 |
# File 'lib/mack/controller/response.rb', line 8 def assigns(key) self.controller.instance_variable_get("@#{key}") end |
#attachment=(file_name) ⇒ Object
12 13 14 |
# File 'lib/mack/controller/response.rb', line 12 def (file_name) self['Content-Disposition'] = "attachment; filename=#{file_name}" end |
#content_type ⇒ Object
20 21 22 |
# File 'lib/mack/controller/response.rb', line 20 def content_type self['Content-Type'] end |
#content_type=(type) ⇒ Object
16 17 18 |
# File 'lib/mack/controller/response.rb', line 16 def content_type=(type) self['Content-Type'] = type end |