Class: UU::OS::Application::AbstractController

Inherits:
Server::AbstractServlet show all
Defined in:
uu_os_application-server-2.7.3/lib/uu/os/application/abstract_controller.rb

Overview

Ancestor for all controllers which are agnostic to particular server (in terms of technology) on which is controller deployed.

Direct Known Subclasses

CMD::CommandController, VUC::VisualUseCaseController

Method Summary

Methods included from Util::ResponseBuilder

#handle_response, #response, #streamed_response

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(method, *args, &block) (private)

Transforms invocation of unimplemented controller action method into valid exception response.



156
157
158
159
160
161
162
163
# File 'uu_os_application-server-2.7.3/lib/uu/os/application/abstract_controller.rb', line 156

def method_missing(method, *args, &block) # :nodoc:
  if method =~ /^on_/ && args.size == 1
    raise UU::OS::Application::ApplicationError.new(UU::OS::IPC::ErrorKind::CLIENT, UU::OS::Application::ErrorCodes::NOT_IMPLEMENTED,
    	"Functionality addressed by #{args[0].request.url} is not implemented.")
  else
    super(method, *args)
  end
end