Skip to content
Vladislav Trotsenko edited this page Sep 26, 2019 · 3 revisions

Synopsis

Provides to set value of semantic marker (semantic_success or semantic_failure) into context. Semantic uses for handling http statuses into ApplicationEndpoint.

Examples of usage

Setting semantic success

class SomeOperation < ApplicationOperation
  step Macro::Semantic(success: :ok) # ctx[:semantic_success] = :ok
end

Setting semantic failure

class SomeOperation < ApplicationOperation
  fail Macro::Semantic(failure: :not_found) # ctx[:semantic_failure] = :not_found
end
Clone this wiki locally