Sha256: 0c9bc388a9021cca5c0a0269a221f03e7f8f6e988a2599d5cbc211e02356ca81
Contents?: true
Size: 406 Bytes
Versions: 6
Compression:
Stored size: 406 Bytes
Contents
module Zebra module Epl module Font class InvalidFontError < StandardError; end SIZE_1 = 1 SIZE_2 = 2 SIZE_3 = 3 SIZE_4 = 4 SIZE_5 = 5 def self.valid_font?(font) (1..5).include?(font.to_i) || ('A'..'Z').include?(font) end def self.validate_font(font) raise InvalidFontError unless valid_font?(font) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems