Module: ActionFigure::Formatter

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 (NoContent lives on Formatter, not required here). Update every built-in formatter when you extend this list; register_formatter validates against it at load time.

%i[Ok Created Accepted UnprocessableContent NotFound Forbidden Conflict PaymentRequired].freeze

Instance Method Summary collapse

Instance Method Details

#NoContentObject



12
13
14
# File 'lib/action_figure/formatter.rb', line 12

def NoContent
  { status: :no_content }
end