Class: Nfe::Webservices::Wsinfo::Factory
- Inherits:
-
Object
- Object
- Nfe::Webservices::Wsinfo::Factory
- Defined in:
- lib/nfe/webservices/wsinfo/factory.rb
Class Method Summary collapse
Class Method Details
.create_wsdl(environment, uf) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/nfe/webservices/wsinfo/factory.rb', line 5 def self.create_wsdl(environment, uf) env = environment.capitalize sefaz = sefaz_by(uf).capitalize Wsinfo::const_get(env).const_get(sefaz).new rescue NameError raise(ArgumentError, I18n.t("webservice.environment_uf.invalid", environment: environment, uf: uf)) end |