Class: Business::BR::CEP::Providers

Inherits:
Object
  • Object
show all
Defined in:
lib/business-br/cep/providers.rb,
lib/business-br/cep/providers/base.rb,
lib/business-br/cep/providers/postmon.rb,
lib/business-br/cep/providers/republicavirtual.rb

Defined Under Namespace

Classes: Base, Postmon, RepublicaVirtual

Class Method Summary collapse

Class Method Details

.get_provider(provider) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/business-br/cep/providers.rb', line 11

def self.get_provider(provider)
  return nil unless provider

  begin
    provider_class = Business::BR::CEP::Providers.const_get(provider)
    provider_class.new if provider_class
  rescue StandardError
    nil
  end
end