Module: Exner

Defined in:
lib/exner.rb,
lib/exner/rtf.rb,
lib/exner/zulliger.rb,
lib/exner/respuesta.rb,
lib/exner/rorschach.rb,
lib/exner/rtf/zulliger.rb,
lib/exner/test_manchas.rb,
lib/exner/rtf/rorschach.rb,
lib/exner/rorschach_plugins/cdi.rb,
lib/exner/rorschach_plugins/hvi.rb,
lib/exner/rorschach_plugins/obs.rb,
lib/exner/rorschach_plugins/depi.rb,
lib/exner/rorschach_plugins/scon.rb,
lib/exner/rorschach_plugins/sczi.rb,
lib/exner/zulliger_plugins/interpretacion.rb,
lib/exner/rorschach_plugins/interpretacion.rb

Overview

Clase que almacena información sobre una respuesta a una lámina

Defined Under Namespace

Modules: Rtf Classes: Respuesta, Rorschach, TestManchas, Zulliger

Constant Summary collapse

VERSION =
"1.0.1"
ROMANOS =

De números arábigos a romanos

{1=>'I',2=>'II', 3=>'III',4=>'IV',5=>'V', 6=>'VI',7=>'VII',8=>'VIII',9=>'IX',10=>'X'}
LOC_VALIDAS =

Localizaciones válidas

['W','D','Dd','WS','DS','DdS']
DQ_VALIDAS =
['+','o','v','v/+']
DET_VALIDOS =
['F','Ma','FMa', 'ma','Mp','FMp', 'mp', 'C', 'CF', 'FC', 'C', 'Cn', "C'", "C'F", "FC'", "T","TF", "FT","V", "VF","FV", "Y", "YF","FY","FD","rF","Fr"]
CONT_VALIDOS =
['H','(H)','Hd','(Hd)','Hx','A','(A)','Ad', '(Ad)', 'An', 'Art','Ay','Bl','Bt','Cg','Cl','Ex','Fd','Fi', 'Ge','Hh', 'Ls', 'Na','Sc','Sx','Xy','Id']
CCEE_VALIDOS =
['DV1','DV2','DR1','DR2','INCOM1','INCOM2','FABCOM1', 'FABCOM2','CONTAM', 'ALOG','PSVi','PSVc','PSVm','CONFAB','AG','COP', 'MOR','AB','PER','CP']
CCEE_IDEACION =
{'DV1'=>1,'DV2'=>2,'INCOM1'=>2,'INCOM2'=>4,'DR1'=>3,'DR2'=>6, 'FABCOM1'=>4, 'FABCOM2'=>7, 'ALOG'=>5, 'CONTAM'=>7}
FQ_VALIDAS =
['+','o','u','-','sin']

Class Method Summary collapse

Class Method Details

.a_romano(i) ⇒ Object



32
33
34
# File 'lib/exner.rb', line 32

def self.a_romano(i)
  i.kind_of?(Integer) ? ROMANOS[i] : false
end

.de_romano(s) ⇒ Object



35
36
37
# File 'lib/exner.rb', line 35

def self.de_romano(s)
	ROMANOS.has_value?(s) ? ROMANOS.key(s):false
end

.dir_dataObject



41
42
43
# File 'lib/exner.rb', line 41

def self.dir_data
  File.dirname(__FILE__)+"/../data/"
end

.dir_rootObject



38
39
40
# File 'lib/exner.rb', line 38

def self.dir_root()
	File.dirname(__FILE__)
end

.open_zest(file) ⇒ Object

Abre un archivo zest y devuelve un hash con los valores correspondientes.



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/exner.rb', line 21

def self.open_zest(file)
	aEst=Hash.new
	File.open(file,'r') { |aFile|
		aFile.each_line {|line|
			if line =~ /(\d+)\s+(\d+\.\d+)/
				aEst[$1.to_i]=$2.to_f
			end
		}
	}
	aEst
end