Module: Trailblazer::Endpoint::Controller::InstanceMethods

Defined in:
lib/trailblazer/endpoint/controller.rb

Defined Under Namespace

Modules: API, DSL

Instance Method Summary collapse

Instance Method Details

#config_sourceObject

Returns object link between compile-time and run-time config



128
129
130
# File 'lib/trailblazer/endpoint/controller.rb', line 128

def config_source
  self.class
end

#endpoint_for(name) ⇒ Object



132
133
134
# File 'lib/trailblazer/endpoint/controller.rb', line 132

def endpoint_for(name)
  config_source.options_for(:endpoints, {}).fetch(name.to_s) # TODO: test non-existant endpoint
end