Module: Core::Service::EndpointHandling

Included in:
Request
Defined in:
app/api/core/service/endpoint_handling.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'app/api/core/service/endpoint_handling.rb', line 3

def self.included(base)
  base.class_eval { attr_reader :endpoint }
end

Instance Method Details

#instance(action, endpoint) ⇒ Object



7
8
9
10
# File 'app/api/core/service/endpoint_handling.rb', line 7

def instance(action, endpoint)
  @endpoint = endpoint
  @endpoint.instance_handler.send(action, self, path)
end

#model(action, endpoint) ⇒ Object



12
13
14
15
# File 'app/api/core/service/endpoint_handling.rb', line 12

def model(action, endpoint)
  @endpoint = endpoint
  @endpoint.model_handler.send(action, self, path)
end