Module: ActionFigure::Formatter

Overview

Base module for response formatters

Constant Summary collapse

REQUIRED_METHODS =

Structural methods every formatter must define: the three success helpers plus the single error_response. Named error helpers are generated from ActionFigure.error_statuses onto ErrorRegistry::Helpers (included here), so they are NOT a per-formatter obligation.

Returns:

  • (Array[Symbol])
%i[Ok Created Accepted error_response].freeze

Instance Method Summary collapse

Methods included from ErrorRegistry::Helpers

#Conflict, #Forbidden, #Gone, #Locked, #NotFound, #PaymentRequired, #UnavailableForLegalReasons, #UnprocessableContent

Instance Method Details

#NoContentActionFigure::response

Returns:

  • (ActionFigure::response)


19
20
21
# File 'lib/action_figure/formatter.rb', line 19

def NoContent
  { status: :no_content }
end