Class: Clases::MensajeMedida
- Defined in:
- lib/imposition/clases.rb
Instance Attribute Summary
Attributes inherited from Mensaje
Instance Method Summary collapse
- #deducirMensaje(level, tipo, args) ⇒ Object
-
#initialize(level, tipo, args) ⇒ MensajeMedida
constructor
A new instance of MensajeMedida.
Methods inherited from Mensaje
Constructor Details
#initialize(level, tipo, args) ⇒ MensajeMedida
Returns a new instance of MensajeMedida.
201 202 203 204 |
# File 'lib/imposition/clases.rb', line 201 def initialize(level, tipo, args) @mensaje=deducirMensaje(level, tipo, args) super(level, @mensaje) end |
Instance Method Details
#deducirMensaje(level, tipo, args) ⇒ Object
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/imposition/clases.rb', line 205 def deducirMensaje(level, tipo, args) if tipo=="horizontal" then if level==3 then return "no caben #{args[0]} paginas de #{args[1]["numero"].to_s+args[1]["unidad"]} de ancho en un pliego de #{args[2]["numero"].to_s+args[2]["unidad"]}" elsif level==2 then return "sobra #{args[0].to_s+args[1]} de ancho" end elsif tipo=="vertical" then if level==3 then return "no caben #{args[0]} paginas de #{args[1]["numero"].to_s+args[1]["unidad"]} de alto en un pliego de #{args[2]["numero"].to_s+args[2]["unidad"]}" elsif level==2 then @id=15 return "sobra #{args[0].to_s+args[1]} de alto" end end end |