Class: Clases::Imposicion
- Inherits:
-
Object
- Object
- Clases::Imposicion
- Defined in:
- lib/imposition/clases.rb
Instance Attribute Summary collapse
-
#bookletz ⇒ Object
Returns the value of attribute bookletz.
-
#cuadernillos ⇒ Object
Returns the value of attribute cuadernillos.
-
#cuadernillosPorCostura ⇒ Object
Returns the value of attribute cuadernillosPorCostura.
-
#h ⇒ Object
Returns the value of attribute h.
-
#h_ ⇒ Object
Returns the value of attribute h_.
-
#hP ⇒ Object
Returns the value of attribute hP.
-
#hP_ ⇒ Object
Returns the value of attribute hP_.
-
#hReal ⇒ Object
Returns the value of attribute hReal.
-
#nPaginas ⇒ Object
Returns the value of attribute nPaginas.
-
#nPaginasReal ⇒ Object
Returns the value of attribute nPaginasReal.
-
#nPliegos ⇒ Object
Returns the value of attribute nPliegos.
-
#nX ⇒ Object
Returns the value of attribute nX.
-
#nY ⇒ Object
Returns the value of attribute nY.
-
#size ⇒ Object
Returns the value of attribute size.
-
#w ⇒ Object
Returns the value of attribute w.
-
#w_ ⇒ Object
Returns the value of attribute w_.
-
#wP ⇒ Object
Returns the value of attribute wP.
-
#wP_ ⇒ Object
Returns the value of attribute wP_.
-
#wReal ⇒ Object
Returns the value of attribute wReal.
Instance Method Summary collapse
-
#initialize(w_, h_, wP_, hP_, nX, nY, nPaginas, nPliegos, cuadernillos) ⇒ Imposicion
constructor
A new instance of Imposicion.
- #to_s ⇒ Object
Constructor Details
#initialize(w_, h_, wP_, hP_, nX, nY, nPaginas, nPliegos, cuadernillos) ⇒ Imposicion
Returns a new instance of Imposicion.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/imposition/clases.rb', line 8 def initialize(w_,h_,wP_,hP_,nX,nY,nPaginas,nPliegos,cuadernillos) @w_=w_ @h_=h_ @wP_=wP_ @hP_=hP_ @nX=nX @nY=nY @nPaginas=nPaginas @nPliegos=nPliegos @cuadernillos=cuadernillos #con unidad @w=@w_["numero"].send(@w_["unidad"]) @h=@h_["numero"].send(@h_["unidad"]) @wP=@wP_["numero"].send(@wP_["unidad"]) @hP=@hP_["numero"].send(@hP_["unidad"]) #sin unidad @nX=@nX["numero"].to_f.floor @nY=@nY["numero"].to_f.floor @nPaginas=@nPaginas["numero"].to_f.floor @nPliegos=@nPliegos["numero"].to_f.floor end |
Instance Attribute Details
#bookletz ⇒ Object
Returns the value of attribute bookletz.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def bookletz @bookletz end |
#cuadernillos ⇒ Object
Returns the value of attribute cuadernillos.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def cuadernillos @cuadernillos end |
#cuadernillosPorCostura ⇒ Object
Returns the value of attribute cuadernillosPorCostura.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def cuadernillosPorCostura @cuadernillosPorCostura end |
#h ⇒ Object
Returns the value of attribute h.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def h @h end |
#h_ ⇒ Object
Returns the value of attribute h_.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def h_ @h_ end |
#hP ⇒ Object
Returns the value of attribute hP.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def hP @hP end |
#hP_ ⇒ Object
Returns the value of attribute hP_.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def hP_ @hP_ end |
#hReal ⇒ Object
Returns the value of attribute hReal.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def hReal @hReal end |
#nPaginas ⇒ Object
Returns the value of attribute nPaginas.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def nPaginas @nPaginas end |
#nPaginasReal ⇒ Object
Returns the value of attribute nPaginasReal.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def nPaginasReal @nPaginasReal end |
#nPliegos ⇒ Object
Returns the value of attribute nPliegos.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def nPliegos @nPliegos end |
#nX ⇒ Object
Returns the value of attribute nX.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def nX @nX end |
#nY ⇒ Object
Returns the value of attribute nY.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def nY @nY end |
#size ⇒ Object
Returns the value of attribute size.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def size @size end |
#w ⇒ Object
Returns the value of attribute w.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def w @w end |
#w_ ⇒ Object
Returns the value of attribute w_.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def w_ @w_ end |
#wP ⇒ Object
Returns the value of attribute wP.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def wP @wP end |
#wP_ ⇒ Object
Returns the value of attribute wP_.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def wP_ @wP_ end |
#wReal ⇒ Object
Returns the value of attribute wReal.
7 8 9 |
# File 'lib/imposition/clases.rb', line 7 def wReal @wReal end |
Instance Method Details
#to_s ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/imposition/clases.rb', line 29 def to_s nXm=@nX if @cuadernillos then nXm*=2 end str=I18n.t(:params)+"\n" str+="nX:"+nXm.to_s+"\n" str+="nY:"+@nY.to_s+"\n" str+=I18n.t(:nPages)+":"+@nPaginas.to_s+"\n" str+=I18n.t(:nSheets)+":"+@nPliegos.to_s+"\n" str+=I18n.t(:pwidth)+":"+@w.to_s+" "+@w_["unidad"]+"\n" str+=I18n.t(:pheight)+":"+@h.to_s+" "+@h_["unidad"]+"\n" str+=I18n.t(:swidth)+":"+@wP.to_s+" "+@wP_["unidad"]+"\n" str+=I18n.t(:sheight)+":"+@hP.to_s+" "+@hP_["unidad"]+"\n" return str end |