Class: DynamicPDFApi::Dim2BarcodeElement
- Inherits:
-
BarcodeElement
- Object
- Element
- BarcodeElement
- DynamicPDFApi::Dim2BarcodeElement
- Defined in:
- lib/ruby_client/Elements/Dim2BarcodeElement.rb
Overview
The base class for 2 dimensional barcode (Aztec, Pdf417, DataMatrixBarcode and QrCode).
Direct Known Subclasses
AztecBarcodeElement, DataMatrixBarcodeElement, Pdf417BarcodeElement, QrCodeElement
Instance Attribute Summary collapse
-
#_value_type ⇒ Object
Returns the value of attribute _value_type.
Attributes inherited from BarcodeElement
#_color_name, #value, #x_dimension
Attributes inherited from Element
#_input_value, #_resource, #_text_font, #_type, #even_pages, #odd_pages, #placement, #x_offset, #y_offset
Instance Method Summary collapse
-
#initialize(value, placement, x_offset, y_offset) ⇒ Dim2BarcodeElement
constructor
A new instance of Dim2BarcodeElement.
Methods inherited from BarcodeElement
Constructor Details
#initialize(value, placement, x_offset, y_offset) ⇒ Dim2BarcodeElement
Returns a new instance of Dim2BarcodeElement.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ruby_client/Elements/Dim2BarcodeElement.rb', line 12 def initialize(value, placement, x_offset, y_offset) if value.is_a?(String) @_value_type = ValueType::STRING super(value, placement, x_offset, y_offset) else super(value, placement, x_offset, y_offset) @_value_type = ValueType::BASE64_ENCODED_BYTES @value = Base64.encode64(value.pack('C*')) @placement = placement @x_offset = x_offset @y_offset = y_offset end end |
Instance Attribute Details
#_value_type ⇒ Object
Returns the value of attribute _value_type.
26 27 28 |
# File 'lib/ruby_client/Elements/Dim2BarcodeElement.rb', line 26 def _value_type @_value_type end |