class ProjetoPesquisa
Attributes
ano_fim[RW]
ano_inicio[RW]
descricao_do_projeto[RW]
descricao_do_projeto_ingles[RW]
equipe_do_projeto[RW]
financiadores_do_projeto[RW]
flag_potencial_inovacao[RW]
natureza[RW]
nome_do_projeto[RW]
nome_do_projeto_ingles[RW]
numero_doutorado[RW]
numero_especializacao[RW]
numero_graduacao[RW]
numero_mestrado_academico[RW]
numero_mestrado_prof[RW]
numero_tecnico_nivel_medio[RW]
sequencia_projeto[RW]
situacao[RW]
Public Class Methods
new(options = [])
click to toggle source
# File lib/cnpq_ws/projeto_pesquisa.rb, line 11 def initialize(options = []) @sequencia_projeto = options[:sequencia_projeto] @ano_inicio = options[:ano_inicio] @ano_fim = options[:ano_fim] @nome_do_projeto = options[:nome_do_projeto] @situacao = options[:situacao] @natureza = options[:natureza] @numero_tecnico_nivel_medio = options[:numero_tecnico_nivel_medio] @numero_graduacao = options[:numero_graduacao] @numero_especializacao = options[:numero_especializacao] @numero_mestrado_academico = options[:numero_mestrado_academico] @numero_mestrado_prof = options[:numero_mestrado_prof] @numero_doutorado = options[:numero_doutorado] @descricao_do_projeto = options[:descricao_do_projeto] @descricao_do_projeto_ingles = options[:descricao_do_projeto_ingles] @nome_do_projeto_ingles = options[:nome_do_projeto_ingles] @flag_potencial_inovacao = options[:flag_potencial_inovacao] @equipe_do_projeto = options[:equipe_do_projeto] @financiadores_do_projeto = options[:financiadores_do_projeto] end
Public Instance Methods
equipe()
click to toggle source
# 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()
click to toggle source
# 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