module Trailblazer::Endpoint::Controller::InstanceMethods::DSL

Public Instance Methods

endpoint(name, **action_options, &block) click to toggle source
# File lib/trailblazer/endpoint/controller.rb, line 132
def endpoint(name, **action_options, &block)
  action_options = {controller: self}.merge(action_options) # FIXME: redundant with {API#endpoint}

  endpoint = endpoint_for(name)

  invoke_endpoint_with_dsl(endpoint: endpoint, **action_options, &block)
end
invoke_endpoint_with_dsl(options, &block) click to toggle source
# File lib/trailblazer/endpoint/controller.rb, line 140
def invoke_endpoint_with_dsl(options, &block)
  _dsl = Trailblazer::Endpoint::DSL::Runtime.new(options, block) # provides #Or etc, is returned to {Controller#call}
end