Module: ApplicationService

Included in:
SampleCoreApi
Defined in:
lib/application_service.rb

Constant Summary collapse

IMPORT_SERVICES =
['cassandra_service', 'consul_service']

Instance Method Summary collapse

Instance Method Details

#load_servicesObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/application_service.rb', line 4

def load_services
   $service_list = {}
	IMPORT_SERVICES.each do |service_name|
     if !service_name.include?('rest_service')
       puts "load_services #{service_name}"
       class_name = service_name.split('_').map{|e| e.capitalize}.join
       class_object = Object.const_get(class_name)
       $service_list["#{service_name}"] = class_object.new
     end
	end
end