Sha256: 05c420ea87e5034c43940cc8e1ba401e1c53b3f9d0af1172b78c86f0fb3e64d7
Contents?: true
Size: 467 Bytes
Versions: 9
Compression:
Stored size: 467 Bytes
Contents
module Zebra module Zpl module Rotation class InvalidRotationError < StandardError; end NO_ROTATION = 'N' DEGREES_90 = 'R' DEGREES_180 = 'I' DEGREES_270 = 'B' def self.valid_rotation?(rotation) [NO_ROTATION, DEGREES_90, DEGREES_180, DEGREES_270].include? rotation end def self.validate_rotation(rotation) raise InvalidRotationError unless valid_rotation?(rotation) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems