Module: ThreeScale::Backend::Server

Defined in:
lib/3scale/backend/server.rb,
lib/3scale/backend/server/puma.rb,
lib/3scale/backend/server/falcon.rb

Defined Under Namespace

Modules: Utils Classes: Falcon, Puma

Class Method Summary collapse

Class Method Details

.get(server_name) ⇒ Object



6
7
8
9
10
11
# File 'lib/3scale/backend/server.rb', line 6

def self.get(server_name)
  server_file = server_name.tr('-', '_')
  require "3scale/backend/server/#{server_file}"
  server_class_name = server_file.tr('_', '').capitalize
  ThreeScale::Backend::Server.const_get server_class_name
end

.listObject



13
14
15
16
17
# File 'lib/3scale/backend/server.rb', line 13

def self.list
  Dir[File.join(ThreeScale::Backend::Util.root_dir, 'lib', '3scale', 'backend', 'server', '*.rb')].map do |s|
    File.basename(s)[0..-4]
  end
end