Module: Exner::Rtf::Zulliger
- Defined in:
- lib/exner/rtf/zulliger.rb
Class Method Summary collapse
Instance Method Summary collapse
- #_cd(c) ⇒ Object
- #_dcp(c) ⇒ Object
- #_ds ⇒ Object
- #_lq(tipo) ⇒ Object
- #_res_enf ⇒ Object
- #aParrafos(array) ⇒ Object
- #detRtf ⇒ Object
- #ldq ⇒ Object
- #superscript(a) ⇒ Object
Class Method Details
.process(text) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/exner/rtf/zulliger.rb', line 48 def self.process(text) t=Exner::Zulliger.new t.open_stream(text) t.procesar t.extend(Exner::Rtf::Zulliger) template=File.read(Exner.dir_data+'/sumario_Zulliger.rtf') zz=t ERB.new(template).result(binding) end |
Instance Method Details
#_cd(c) ⇒ Object
8 9 10 |
# File 'lib/exner/rtf/zulliger.rb', line 8 def _cd(c) c+" = "+_f['contenidos_1'][c].to_s+","+_f['contenidos_2'][c].to_s end |
#_dcp(c) ⇒ Object
5 6 7 |
# File 'lib/exner/rtf/zulliger.rb', line 5 def _dcp(c) _ds[c.gsub('C',"C'")] end |
#_ds ⇒ Object
18 19 20 |
# File 'lib/exner/rtf/zulliger.rb', line 18 def _ds determinantes_simples end |
#_lq(tipo) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/exner/rtf/zulliger.rb', line 29 def _lq(tipo) s='' Exner::FQ_VALIDAS.each {|fq| s+=fq+":"+_f[tipo][fq].to_s+"\n\\par " } s end |
#_res_enf ⇒ Object
24 25 26 27 28 |
# File 'lib/exner/rtf/zulliger.rb', line 24 def _res_enf a=resumen_del_enfoque.collect {|lam| Exner.a_romano(lam[0])+":"+lam[1].join(',') }.join("\n\\par ")+"\n" end |
#aParrafos(array) ⇒ Object
43 44 45 46 47 |
# File 'lib/exner/rtf/zulliger.rb', line 43 def aParrafos(array) array.collect {|x| "\n\\par "+x.to_s }.join("") end |
#detRtf ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/exner/rtf/zulliger.rb', line 11 def detRtf s="" @respuestas.each {|n,r| s+="\n\\par "+r.determinantes.join('.')+r.fq if r.determinantes.size>1 } s end |
#ldq ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/exner/rtf/zulliger.rb', line 36 def ldq s='' Exner::DQ_VALIDAS.each {|dq| s+=dq+":"+_f['dq'][dq].to_s+"\n\\par " } s end |
#superscript(a) ⇒ Object
21 22 23 |
# File 'lib/exner/rtf/zulliger.rb', line 21 def superscript(a) '{{\*\updnprop5801}\up8 '+a+'}' end |