Module: Assemblyline::Ruby::Provider
- Extended by:
- Provider
- Included in:
- Provider
- Defined in:
- lib/assemblyline/ruby/provider.rb,
lib/assemblyline/ruby/provider/alpine.rb,
lib/assemblyline/ruby/provider/debian.rb
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#load_provider(name) ⇒ Object
20 21 22 23 |
# File 'lib/assemblyline/ruby/provider.rb', line 20 def load_provider(name) require "assemblyline/ruby/provider/#{name}" const_get(name.capitalize).new end |
#provider ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/assemblyline/ruby/provider.rb', line 8 def provider platform = Platform.new load_provider(platform.id) rescue NameError, LoadError => e begin return load_provider(platform.like) if platform.like fail e rescue NameError, LoadError raise "Platform: #{platform.id} not supported" end end |