Class: Labels::Template
Overview
This class represents template types and properties
Constant Summary collapse
- DEFAULT =
{:title => 'Default', :description => 'Default template', :manufacturer => 'none', :category => 'Default', :visible => false, :width => 288, :height => 144, :columns => 2, :rows => 5, :left_margin => 13, :right_margin => 13, :top_margin => 36, :bottom_margin => 36, :horizontal_gutter => 0, :vertical_gutter => 10, :elliptical => false, :corner_radius => 18}
Instance Attribute Summary collapse
-
#bottom_margin ⇒ Object
Bottom margin of template in pixels.
-
#category ⇒ Object
Category of template.
-
#columns ⇒ Object
Number of columns in template.
-
#corner_radius ⇒ Object
Corner radius of template canvas area in pixels.
-
#description ⇒ Object
Description of template.
-
#elliptical ⇒ Object
Whether or not the template canvas area is elliptical.
-
#height ⇒ Object
Height of template canvas area in pixels.
-
#horizontal_gutter ⇒ Object
Horizontal gutter of template in pixels.
-
#left_margin ⇒ Object
Left margin of template in pixels.
-
#manufacturer ⇒ Object
Manufacturer of template.
-
#right_margin ⇒ Object
Right margin of template in pixels.
-
#rows ⇒ Object
Number of rows in template.
-
#title ⇒ Object
Title of template.
-
#top_margin ⇒ Object
Top margin of template in pixels.
-
#vertical_gutter ⇒ Object
Vertical gutter of template in pixels.
-
#visible ⇒ Object
Whether or not the template is visible when printed.
-
#width ⇒ Object
Width of template canvas area in pixels.
Method Summary
Methods inherited from Element
Constructor Details
This class inherits a constructor from Labels::Element
Instance Attribute Details
#bottom_margin ⇒ Object
Bottom margin of template in pixels
54 55 56 |
# File 'lib/labels/template.rb', line 54 def bottom_margin @bottom_margin end |
#category ⇒ Object
Category of template
27 28 29 |
# File 'lib/labels/template.rb', line 27 def category @category end |
#columns ⇒ Object
Number of columns in template
39 40 41 |
# File 'lib/labels/template.rb', line 39 def columns @columns end |
#corner_radius ⇒ Object
Corner radius of template canvas area in pixels
66 67 68 |
# File 'lib/labels/template.rb', line 66 def corner_radius @corner_radius end |
#description ⇒ Object
Description of template
21 22 23 |
# File 'lib/labels/template.rb', line 21 def description @description end |
#elliptical ⇒ Object
Whether or not the template canvas area is elliptical
63 64 65 |
# File 'lib/labels/template.rb', line 63 def elliptical @elliptical end |
#height ⇒ Object
Height of template canvas area in pixels
36 37 38 |
# File 'lib/labels/template.rb', line 36 def height @height end |
#horizontal_gutter ⇒ Object
Horizontal gutter of template in pixels
57 58 59 |
# File 'lib/labels/template.rb', line 57 def horizontal_gutter @horizontal_gutter end |
#left_margin ⇒ Object
Left margin of template in pixels
45 46 47 |
# File 'lib/labels/template.rb', line 45 def left_margin @left_margin end |
#manufacturer ⇒ Object
Manufacturer of template
24 25 26 |
# File 'lib/labels/template.rb', line 24 def manufacturer @manufacturer end |
#right_margin ⇒ Object
Right margin of template in pixels
48 49 50 |
# File 'lib/labels/template.rb', line 48 def right_margin @right_margin end |
#rows ⇒ Object
Number of rows in template
42 43 44 |
# File 'lib/labels/template.rb', line 42 def rows @rows end |
#title ⇒ Object
Title of template
18 19 20 |
# File 'lib/labels/template.rb', line 18 def title @title end |
#top_margin ⇒ Object
Top margin of template in pixels
51 52 53 |
# File 'lib/labels/template.rb', line 51 def top_margin @top_margin end |
#vertical_gutter ⇒ Object
Vertical gutter of template in pixels
60 61 62 |
# File 'lib/labels/template.rb', line 60 def vertical_gutter @vertical_gutter end |
#visible ⇒ Object
Whether or not the template is visible when printed
30 31 32 |
# File 'lib/labels/template.rb', line 30 def visible @visible end |
#width ⇒ Object
Width of template canvas area in pixels
33 34 35 |
# File 'lib/labels/template.rb', line 33 def width @width end |