Class: LabelPrinter::Label::BatchRedirect

Inherits:
Object
  • Object
show all
Defined in:
lib/label_printer/label_printer/label/batch_redirect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BatchRedirect

Returns a new instance of BatchRedirect


6
7
8
9
# File 'lib/label_printer/label_printer/label/batch_redirect.rb', line 6

def initialize(options)
  @printer_type_class = options[:printer_type_class]
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options


4
5
6
# File 'lib/label_printer/label_printer/label/batch_redirect.rb', line 4

def options
  @options
end

Instance Method Details

#to_hObject


11
12
13
14
15
16
17
# File 'lib/label_printer/label_printer/label/batch_redirect.rb', line 11

def to_h
  if @printer_type_class.double_label?
    BatchPlateDouble.new(options).to_h
  else
    BatchPlate.new(options).to_h
  end
end