Class: LabelPrinter::Label::BatchRedirect

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

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BatchRedirect

Returns a new instance of BatchRedirect.


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

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.


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

def options
  @options
end

Instance Method Details

#to_hObject


12
13
14
# File 'lib/label_printer/label_printer/label/batch_redirect.rb', line 12

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