lib/br_documents/ie/factory.rb in br_documents-0.1.3 vs lib/br_documents/ie/factory.rb in br_documents-0.2.0

- old
+ new

@@ -1,12 +1,12 @@ module BrDocuments module IE class Factory - def self.create(uf, number) - klass = IE.const_get("#{uf}") + def self.create(uf_symbol, number) + klass = IE.const_get(uf_symbol.to_s) klass.new(number) rescue NameError - raise(ArgumentError, I18n.t("validator.ie.uf.invalid")) + raise(ArgumentError, I18n.t('validator.ie.uf.invalid')) end end end end