Module: Zebra::Zpl::FontType
- Defined in:
- lib/zebra/zpl/font.rb
Defined Under Namespace
Classes: InvalidFontTypeError
Constant Summary collapse
- TYPE_0 =
6pt
"0"- TYPE_CD =
6pt
"CD"- TYPE_A =
6pt
"A"- TYPE_B =
6pt
"B"- TYPE_D =
6pt
"D"- TYPE_E =
6pt
"E"- TYPE_F =
6pt
"F"- TYPE_G =
6pt
"G"- TYPE_H =
6pt
"H"
Class Method Summary collapse
Class Method Details
.valid_font_type?(font_type) ⇒ Boolean
39 40 41 |
# File 'lib/zebra/zpl/font.rb', line 39 def self.valid_font_type?(font_type) ["0", "CD", "A", "B", "D", "E", "F", "G", "H"].include?(font_type) end |
.validate_font_type(font_type) ⇒ Object
43 44 45 |
# File 'lib/zebra/zpl/font.rb', line 43 def self.validate_font_type(font_type) raise InvalidFontTypeError unless valid_font_type?(font_type) end |