Class: Zebra::Epl::Barcode
- Inherits:
-
Object
- Object
- Zebra::Epl::Barcode
- Includes:
- Printable
- Defined in:
- lib/zebra/epl/barcode.rb
Defined Under Namespace
Classes: InvalidNarrowBarWidthError, InvalidWideBarWidthError
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#narrow_bar_width ⇒ Object
Returns the value of attribute narrow_bar_width.
- #print_human_readable_code ⇒ Object
-
#type ⇒ Object
Returns the value of attribute type.
-
#wide_bar_width ⇒ Object
Returns the value of attribute wide_bar_width.
Attributes included from Printable
Instance Method Summary collapse
Methods included from Printable
#initialize, #rotation, #rotation=
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
11 12 13 |
# File 'lib/zebra/epl/barcode.rb', line 11 def height @height end |
#narrow_bar_width ⇒ Object
Returns the value of attribute narrow_bar_width.
12 13 14 |
# File 'lib/zebra/epl/barcode.rb', line 12 def @narrow_bar_width end |
#print_human_readable_code ⇒ Object
30 31 32 |
# File 'lib/zebra/epl/barcode.rb', line 30 def print_human_readable_code @print_human_readable_code || false end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/zebra/epl/barcode.rb', line 12 def type @type end |
#wide_bar_width ⇒ Object
Returns the value of attribute wide_bar_width.
12 13 14 |
# File 'lib/zebra/epl/barcode.rb', line 12 def @wide_bar_width end |
Instance Method Details
#to_epl ⇒ Object
34 35 36 37 38 |
# File 'lib/zebra/epl/barcode.rb', line 34 def to_epl check_attributes human_readable = print_human_readable_code ? "B" : "N" ["B#{x}", y, rotation, type, , , height, human_readable, "\"#{data}\""].join(",") end |