lib/receitaws/cnpj.rb in receitaws-0.1.0 vs lib/receitaws/cnpj.rb in receitaws-0.1.1
- old
+ new
@@ -7,10 +7,11 @@
def initialize(result=nil)
if result.nil?
@status = :error
@message = "Timeout"
+ return self
end
if result["status"] == "ERROR"
@status = :error
@message = result["message"]
@@ -40,9 +41,10 @@
result["atividades_secundarias"].each do |atividade|
@atividades << {code: atividade["code"], text: atividade["text"]}
end
@cnaes = @atividades.collect{|a| a[:code].to_s.gsub(/[^0-9A-Za-z]/, '')}
+ return self
end
end
end