Class: AwSec::Providers::Register

Inherits:
Object
  • Object
show all
Defined in:
lib/aw_sec/providers.rb

Class Method Summary collapse

Class Method Details

.listObject



10
11
12
# File 'lib/aw_sec/providers.rb', line 10

def self.list
  @register
end

.provider(provider_name) ⇒ Object



14
15
16
17
18
# File 'lib/aw_sec/providers.rb', line 14

def self.provider(provider_name)
  puts "Configuring #{provider_name}"
  klass = Kernel.const_get(provider_name)
  klass.new
end

.register(name, klass) ⇒ Object



5
6
7
8
# File 'lib/aw_sec/providers.rb', line 5

def self.register(name, klass)
  @register ||= []
  @register << { :name => name, :class => klass }
end