forked from rubygarage/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Macro::Semantic
Vladislav Trotsenko edited this page Oct 21, 2020
·
1 revision
Provides to set value of semantic marker (semantic_success or semantic_failure) into context. Semantic uses for handling http statuses into ApplicationEndpoint.
class SomeOperation < ApplicationOperation
step Macro::Semantic(success: :ok) # ctx[:semantic_success] = :ok
endclass SomeOperation < ApplicationOperation
fail Macro::Semantic(failure: :not_found) # ctx[:semantic_failure] = :not_found
end