Class: Labels::Paper

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

Overview

This class represents paper types and dimensions.

Constant Summary collapse

LETTER =
{:title => 'Letter', :width => 612, :height => 792}
{:title => 'Legal', :width => 612, :height => 1008}
LEDGER =
{:title => 'Ledger', :width => 792, :height => 1224}
A5 =
{:title => 'A5', :width => 420, :height => 595}
A4 =
{:title => 'A4', :width => 595, :height => 842}
A3 =
{:title => 'A3', :width => 842, :height => 1191}

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

#heightObject

Height of paper in pixels



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

def height
  @height
end

#titleObject

Title of paper type



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

def title
  @title
end

#widthObject

Width of paper in pixels



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

def width
  @width
end