Class: Labels::Template

Inherits:
Element show all
Defined in:
lib/labels/template.rb

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

Method Summary

Methods inherited from Element

#initialize, #to_h

Constructor Details

This class inherits a constructor from Labels::Element

Instance Attribute Details

#bottom_marginObject

Bottom margin of template in pixels



54
55
56
# File 'lib/labels/template.rb', line 54

def bottom_margin
  @bottom_margin
end

#categoryObject

Category of template



27
28
29
# File 'lib/labels/template.rb', line 27

def category
  @category
end

#columnsObject

Number of columns in template



39
40
41
# File 'lib/labels/template.rb', line 39

def columns
  @columns
end

#corner_radiusObject

Corner radius of template canvas area in pixels



66
67
68
# File 'lib/labels/template.rb', line 66

def corner_radius
  @corner_radius
end

#descriptionObject

Description of template



21
22
23
# File 'lib/labels/template.rb', line 21

def description
  @description
end

#ellipticalObject

Whether or not the template canvas area is elliptical



63
64
65
# File 'lib/labels/template.rb', line 63

def elliptical
  @elliptical
end

#heightObject

Height of template canvas area in pixels



36
37
38
# File 'lib/labels/template.rb', line 36

def height
  @height
end

#horizontal_gutterObject

Horizontal gutter of template in pixels



57
58
59
# File 'lib/labels/template.rb', line 57

def horizontal_gutter
  @horizontal_gutter
end

#left_marginObject

Left margin of template in pixels



45
46
47
# File 'lib/labels/template.rb', line 45

def left_margin
  @left_margin
end

#manufacturerObject

Manufacturer of template



24
25
26
# File 'lib/labels/template.rb', line 24

def manufacturer
  @manufacturer
end

#right_marginObject

Right margin of template in pixels



48
49
50
# File 'lib/labels/template.rb', line 48

def right_margin
  @right_margin
end

#rowsObject

Number of rows in template



42
43
44
# File 'lib/labels/template.rb', line 42

def rows
  @rows
end

#titleObject

Title of template



18
19
20
# File 'lib/labels/template.rb', line 18

def title
  @title
end

#top_marginObject

Top margin of template in pixels



51
52
53
# File 'lib/labels/template.rb', line 51

def top_margin
  @top_margin
end

#vertical_gutterObject

Vertical gutter of template in pixels



60
61
62
# File 'lib/labels/template.rb', line 60

def vertical_gutter
  @vertical_gutter
end

#visibleObject

Whether or not the template is visible when printed



30
31
32
# File 'lib/labels/template.rb', line 30

def visible
  @visible
end

#widthObject

Width of template canvas area in pixels



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

def width
  @width
end