Class: Zebra::Zpl::Qrcode
- Inherits:
-
Object
- Object
- Zebra::Zpl::Qrcode
- Includes:
- Printable
- Defined in:
- lib/zebra/zpl/qrcode.rb
Defined Under Namespace
Classes: InvalidCorrectionLevelError, InvalidScaleFactorError
Instance Attribute Summary collapse
-
#correction_level ⇒ Object
Returns the value of attribute correction_level.
-
#scale_factor ⇒ Object
Returns the value of attribute scale_factor.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes included from Printable
#data, #margin, #position, #x, #y
Instance Method Summary collapse
Methods included from Printable
#initialize, #justification, #justification=, #rotation, #rotation=
Instance Attribute Details
#correction_level ⇒ Object
Returns the value of attribute correction_level.
11 12 13 |
# File 'lib/zebra/zpl/qrcode.rb', line 11 def correction_level @correction_level end |
#scale_factor ⇒ Object
Returns the value of attribute scale_factor.
11 12 13 |
# File 'lib/zebra/zpl/qrcode.rb', line 11 def scale_factor @scale_factor end |
#width ⇒ Object
Returns the value of attribute width.
11 12 13 |
# File 'lib/zebra/zpl/qrcode.rb', line 11 def width @width end |
Instance Method Details
#to_zpl ⇒ Object
27 28 29 30 |
# File 'lib/zebra/zpl/qrcode.rb', line 27 def to_zpl check_attributes "^FW#{rotation}^FO#{x},#{y}^BY,,10^BQN,2,#{scale_factor},,3^FD#{correction_level}A,#{data}^FS" end |