Module: Zebra::Epl::PrintMode

Defined in:
lib/zebra/epl/print_mode.rb

Defined Under Namespace

Classes: InvalidPrintModeError

Constant Summary collapse

NORMAL =
"N"
REVERSE =
"R"

Class Method Summary collapse

Class Method Details

.valid_mode?(mode) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/zebra/epl/print_mode.rb', line 9

def self.valid_mode?(mode)
  %w(N R).include? mode
end

.validate_mode(mode) ⇒ Object



13
14
15
# File 'lib/zebra/epl/print_mode.rb', line 13

def self.validate_mode(mode)
  raise InvalidPrintModeError unless valid_mode?(mode)
end