Class: Zebra::Epl::Qrcode

Inherits:
Object
  • Object
show all
Includes:
Printable
Defined in:
lib/zebra/epl/qrcode.rb

Defined Under Namespace

Classes: InvalidCorrectionLevelError, InvalidScaleFactorError

Instance Attribute Summary collapse

Attributes included from Printable

#data, #position, #x, #y

Instance Method Summary collapse

Methods included from Printable

#initialize, #rotation, #rotation=

Instance Attribute Details

#correction_levelObject

Returns the value of attribute correction_level.



11
12
13
# File 'lib/zebra/epl/qrcode.rb', line 11

def correction_level
  @correction_level
end

#scale_factorObject

Returns the value of attribute scale_factor.



11
12
13
# File 'lib/zebra/epl/qrcode.rb', line 11

def scale_factor
  @scale_factor
end

Instance Method Details

#to_eplObject



23
24
25
26
# File 'lib/zebra/epl/qrcode.rb', line 23

def to_epl
  check_attributes
  ["b#{x}", y, "Q", "s#{scale_factor}", "e#{correction_level}", "\"#{data}\""].join(",")
end