A REST Resource Representation format.
Methods
Attributes
| [RW] | content_type | The resource content type. Typically the resource MIME type is used. |
| [RW] | extension | The default resource extension. |
| [RW] | name | The name of this format. |
| [RW] | template_extension | The default template extension. |
Public Instance methods
This callback is called after the action is executed with this format.
[ show source ]
# File lib/raw/dispatcher/format.rb, line 46
46: def after_action(controller, context)
47: end
This callback is called before the action is executed with this format.
[ show source ]
# File lib/raw/dispatcher/format.rb, line 40
40: def before_action(controller, context)
41: end
Apply filters to the template source. The original template representation must be transformed to executable Ruby code at the end.
[ show source ]
# File lib/raw/dispatcher/format.rb, line 33
33: def filter_template(source)
34: return source
35: end
[ show source ]
# File lib/raw/dispatcher/format.rb, line 25
25: def to_s
26: @name
27: end