Class: LabelFactory::Template::Base
- Inherits:
-
Object
- Object
- LabelFactory::Template::Base
- Includes:
- XML::Mapping
- Defined in:
- lib/label_factory/template/base.rb
Constant Summary collapse
- DEFAULT =
'avery-us-templates.xml'
Instance Attribute Summary collapse
-
#labels ⇒ Object
Returns the value of attribute labels.
Instance Method Summary collapse
- #find_description ⇒ Object
- #first_layout ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #label ⇒ Object
- #nx ⇒ Object
- #ny ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
25 26 27 |
# File 'lib/label_factory/template/base.rb', line 25 def initialize end |
Instance Attribute Details
#labels ⇒ Object
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_description ⇒ Object
41 42 43 |
# File 'lib/label_factory/template/base.rb', line 41 def find_description _description || description end |
#first_layout ⇒ Object
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 |
#label ⇒ Object
50 51 52 |
# File 'lib/label_factory/template/base.rb', line 50 def label labels['0'] end |
#nx ⇒ Object
33 34 35 |
# File 'lib/label_factory/template/base.rb', line 33 def nx first_layout.nx if first_layout end |
#ny ⇒ Object
37 38 39 |
# File 'lib/label_factory/template/base.rb', line 37 def ny first_layout.ny if first_layout end |