Module: Response
- Defined in:
- lib/primate/response.rb
Class Method Summary collapse
-
.error(options = {}) ⇒ Hash
Create an error response.
-
.redirect(location, options = {}) ⇒ Hash
Create a redirect response.
-
.view(name, props = {}, options = {}) ⇒ Hash
Create a view response.
Class Method Details
.error(options = {}) ⇒ Hash
Create an error response
27 28 29 |
# File 'lib/primate/response.rb', line 27 def self.error( = {}) { __PRMT__: 'error', options: } end |
.redirect(location, options = {}) ⇒ Hash
Create a redirect response
19 20 21 |
# File 'lib/primate/response.rb', line 19 def self.redirect(location, = {}) { __PRMT__: 'redirect', location: location, options: } end |
.view(name, props = {}, options = {}) ⇒ Hash
Create a view response
10 11 12 |
# File 'lib/primate/response.rb', line 10 def self.view(name, props = {}, = {}) { __PRMT__: 'view', name: name, props: props, options: } end |