Module: ActionFigure::Formatter
- Included in:
- ActionFigure::Formatters::Default, ActionFigure::Formatters::Jsend, ActionFigure::Formatters::JsonApi, ActionFigure::Formatters::Wrapped
- Defined in:
- lib/action_figure/formatter.rb
Overview
Base module for ActionFigure response formatters. Include this in your formatter module to get a NoContent default and to signal that your module implements the formatter interface.
Constant Summary collapse
- REQUIRED_METHODS =
Response helper names every formatter must define (
NoContentlives onFormatter, not required here). Update every built-in formatter when you extend this list;register_formattervalidates against it at load time. %i[Ok Created Accepted UnprocessableContent NotFound Forbidden Conflict PaymentRequired].freeze
Instance Method Summary collapse
Instance Method Details
#NoContent ⇒ Object
12 13 14 |
# File 'lib/action_figure/formatter.rb', line 12 def NoContent { status: :no_content } end |