Method: Trailblazer::Endpoint::Builder::DSL.endpoints_for
- Defined in:
- lib/trailblazer/endpoint/builder.rb
.endpoints_for(dsl_options, **options) ⇒ Object
dsl_options being something like
"api:Start.default" => {policies: []},
"api:status?" => {policies: [:user_owns_diagram]},
"api:download?" => {policies: [:user_owns_diagram]},
"api:delete?" => {policies: [:user_owns_diagram]},
47 48 49 50 51 |
# File 'lib/trailblazer/endpoint/builder.rb', line 47 def endpoints_for(, **) endpoints = .collect do |id, config| endpoint_for(id: id, **, **config) # config is per endpoint, options are "global" end.to_h end |