class Etti::Page

Attributes

borders[RW]
cols[RW]
description[RW]
manufacture[RW]
name[RW]
orderNr[RW]
padding[RW]
pageSize[RW]
rows[RW]
size[RW]

Public Class Methods

new(*ag) click to toggle source

all metrics in mm

# File lib/etti/page.rb, line 6
def initialize *ag
    args = ag.extract_args!

    @name = args[:name] || ''
    # the manufacture of the labels
    @manufacture = args[:manufacture] || ''
    # the original order number
    @orderNr = args[:orderNr] || ''
    # a longer description of the labels
    @description = args[:description] || ''
    @pageSize = args[:pageSize] || 'a4'
    @cols = args[:cols] || 10
    @rows = args[:rows] || 28
    # size of a single label
    # one value = circular labels = diameter
    # two values = rectangle labels = width x height
    @size = args[:size] || [20.0, 10.0]
    # left, top; we asume, that left, right and top, bottom are equal
    @borders = args[:borders] || [5.0, 7.0]
    # borders between labels; horizontal, vertical
    @padding = args[:padding] || [0.0, 0.0]
end