Sha256: efd73b8f51a65d2f97bf111bfa826e727ae47b5a94c6454b9cff6ecad9907fbe
Contents?: true
Size: 544 Bytes
Versions: 9
Compression:
Stored size: 544 Bytes
Contents
module Zebra module Zpl module Justification class InvalidJustificationError < StandardError; end # ZPL-supported values ("L" is default) LEFT = 'L' RIGHT = 'R' CENTER = 'C' JUSTIFIED = 'J' def self.valid_justification?(justification) [LEFT, RIGHT, CENTER, JUSTIFIED].include? justification end def self.validate_justification(justification) raise InvalidJustificationError unless valid_justification?(justification) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems