Class: LabelFactory::Template::Base

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/label_factory/template/base.rb

Constant Summary collapse

DEFAULT =
'avery-us-templates.xml'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



25
26
27
# File 'lib/label_factory/template/base.rb', line 25

def initialize

end

Instance Attribute Details

#labelsObject

Returns the value of attribute labels.



8
9
10
# File 'lib/label_factory/template/base.rb', line 8

def labels
  @labels
end

Instance Method Details

#find_descriptionObject



41
42
43
# File 'lib/label_factory/template/base.rb', line 41

def find_description
  _description || description
end

#first_layoutObject



45
46
47
48
# File 'lib/label_factory/template/base.rb', line 45

def first_layout
  label = labels['0']
  label.layouts.first if label
end

#labelObject



50
51
52
# File 'lib/label_factory/template/base.rb', line 50

def label
  labels['0']
end

#nxObject



33
34
35
# File 'lib/label_factory/template/base.rb', line 33

def nx
  first_layout.nx if first_layout
end

#nyObject



37
38
39
# File 'lib/label_factory/template/base.rb', line 37

def ny
  first_layout.ny if first_layout
end