Class: ProjetoPesquisa
- Inherits:
-
Object
- Object
- ProjetoPesquisa
- Defined in:
- lib/cnpq_ws/projeto_pesquisa.rb
Instance Attribute Summary collapse
-
#ano_fim ⇒ Object
Returns the value of attribute ano_fim.
-
#ano_inicio ⇒ Object
Returns the value of attribute ano_inicio.
-
#descricao_do_projeto ⇒ Object
Returns the value of attribute descricao_do_projeto.
-
#descricao_do_projeto_ingles ⇒ Object
Returns the value of attribute descricao_do_projeto_ingles.
-
#equipe_do_projeto ⇒ Object
Returns the value of attribute equipe_do_projeto.
-
#financiadores_do_projeto ⇒ Object
Returns the value of attribute financiadores_do_projeto.
-
#flag_potencial_inovacao ⇒ Object
Returns the value of attribute flag_potencial_inovacao.
-
#natureza ⇒ Object
Returns the value of attribute natureza.
-
#nome_do_projeto ⇒ Object
Returns the value of attribute nome_do_projeto.
-
#nome_do_projeto_ingles ⇒ Object
Returns the value of attribute nome_do_projeto_ingles.
-
#numero_doutorado ⇒ Object
Returns the value of attribute numero_doutorado.
-
#numero_especializacao ⇒ Object
Returns the value of attribute numero_especializacao.
-
#numero_graduacao ⇒ Object
Returns the value of attribute numero_graduacao.
-
#numero_mestrado_academico ⇒ Object
Returns the value of attribute numero_mestrado_academico.
-
#numero_mestrado_prof ⇒ Object
Returns the value of attribute numero_mestrado_prof.
-
#numero_tecnico_nivel_medio ⇒ Object
Returns the value of attribute numero_tecnico_nivel_medio.
-
#sequencia_projeto ⇒ Object
Returns the value of attribute sequencia_projeto.
-
#situacao ⇒ Object
Returns the value of attribute situacao.
Instance Method Summary collapse
- #equipe ⇒ Object
- #financiadores ⇒ Object
-
#initialize(options = []) ⇒ ProjetoPesquisa
constructor
A new instance of ProjetoPesquisa.
Constructor Details
#initialize(options = []) ⇒ ProjetoPesquisa
Returns a new instance of ProjetoPesquisa.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 11 def initialize( = []) @sequencia_projeto = [:sequencia_projeto] @ano_inicio = [:ano_inicio] @ano_fim = [:ano_fim] @nome_do_projeto = [:nome_do_projeto] @situacao = [:situacao] @natureza = [:natureza] @numero_tecnico_nivel_medio = [:numero_tecnico_nivel_medio] @numero_graduacao = [:numero_graduacao] @numero_especializacao = [:numero_especializacao] @numero_mestrado_academico = [:numero_mestrado_academico] @numero_mestrado_prof = [:numero_mestrado_prof] @numero_doutorado = [:numero_doutorado] @descricao_do_projeto = [:descricao_do_projeto] @descricao_do_projeto_ingles = [:descricao_do_projeto_ingles] @nome_do_projeto_ingles = [:nome_do_projeto_ingles] @flag_potencial_inovacao = [:flag_potencial_inovacao] @equipe_do_projeto = [:equipe_do_projeto] @financiadores_do_projeto = [:financiadores_do_projeto] end |
Instance Attribute Details
#ano_fim ⇒ Object
Returns the value of attribute ano_fim.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def ano_fim @ano_fim end |
#ano_inicio ⇒ Object
Returns the value of attribute ano_inicio.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def ano_inicio @ano_inicio end |
#descricao_do_projeto ⇒ Object
Returns the value of attribute descricao_do_projeto.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def descricao_do_projeto @descricao_do_projeto end |
#descricao_do_projeto_ingles ⇒ Object
Returns the value of attribute descricao_do_projeto_ingles.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def descricao_do_projeto_ingles @descricao_do_projeto_ingles end |
#equipe_do_projeto ⇒ Object
Returns the value of attribute equipe_do_projeto.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def equipe_do_projeto @equipe_do_projeto end |
#financiadores_do_projeto ⇒ Object
Returns the value of attribute financiadores_do_projeto.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def financiadores_do_projeto @financiadores_do_projeto end |
#flag_potencial_inovacao ⇒ Object
Returns the value of attribute flag_potencial_inovacao.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def flag_potencial_inovacao @flag_potencial_inovacao end |
#natureza ⇒ Object
Returns the value of attribute natureza.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def natureza @natureza end |
#nome_do_projeto ⇒ Object
Returns the value of attribute nome_do_projeto.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def nome_do_projeto @nome_do_projeto end |
#nome_do_projeto_ingles ⇒ Object
Returns the value of attribute nome_do_projeto_ingles.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def nome_do_projeto_ingles @nome_do_projeto_ingles end |
#numero_doutorado ⇒ Object
Returns the value of attribute numero_doutorado.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def numero_doutorado @numero_doutorado end |
#numero_especializacao ⇒ Object
Returns the value of attribute numero_especializacao.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def numero_especializacao @numero_especializacao end |
#numero_graduacao ⇒ Object
Returns the value of attribute numero_graduacao.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def numero_graduacao @numero_graduacao end |
#numero_mestrado_academico ⇒ Object
Returns the value of attribute numero_mestrado_academico.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def numero_mestrado_academico @numero_mestrado_academico end |
#numero_mestrado_prof ⇒ Object
Returns the value of attribute numero_mestrado_prof.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def numero_mestrado_prof @numero_mestrado_prof end |
#numero_tecnico_nivel_medio ⇒ Object
Returns the value of attribute numero_tecnico_nivel_medio.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def numero_tecnico_nivel_medio @numero_tecnico_nivel_medio end |
#sequencia_projeto ⇒ Object
Returns the value of attribute sequencia_projeto.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def sequencia_projeto @sequencia_projeto end |
#situacao ⇒ Object
Returns the value of attribute situacao.
5 6 7 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 5 def situacao @situacao end |
Instance Method Details
#equipe ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 32 def equipe e = [] if self.equipe_do_projeto["INTEGRANTES_DO_PROJETO"].class == Array self.equipe_do_projeto.each do |m| Hash[*m]["INTEGRANTES_DO_PROJETO"].each do |i| e << Membro.new(nome_completo: i["NOME_COMPLETO"], nome_para_citacao: i["NOME_PARA_CITACAO"], ordem_de_integracao: i["ORDEM_DE_INTEGRACAO"], flag_responsavel: i["FLAG_RESPONSAVEL"], nro_id_cnpq: i["NRO_ID_CNPQ"]) end end elsif self.equipe_do_projeto["INTEGRANTES_DO_PROJETO"].class == Hash i = self.equipe_do_projeto["INTEGRANTES_DO_PROJETO"] e << Membro.new(nome_completo: i["NOME_COMPLETO"], nome_para_citacao: i["NOME_PARA_CITACAO"], ordem_de_integracao: i["ORDEM_DE_INTEGRACAO"], flag_responsavel: i["FLAG_RESPONSAVEL"], nro_id_cnpq: i["NRO_ID_CNPQ"]) end e end |
#financiadores ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/cnpq_ws/projeto_pesquisa.rb', line 47 def financiadores if self.financiadores_do_projeto.try(:any?) f = [] self.financiadores_do_projeto.map{|k,v| v}.flatten.each do |fn| f << Financiador.new(sequencia_financiador: fn["SEQUENCIA_FINANCIADOR"], codigo_instituicao: fn["CODIGO_INSTITUICAO"], nome_instituicao: fn["NOME_INSTITUICAO"], natureza: fn["NATUREZA"]) end f end end |