Module: Zebra::Epl::Printable

Included in:
Barcode, Box, Text
Defined in:
lib/zebra/epl/printable.rb

Defined Under Namespace

Classes: MissingAttributeError

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data.



11
12
13
# File 'lib/zebra/epl/printable.rb', line 11

def data
  @data
end

#positionObject

Returns the value of attribute position.



10
11
12
# File 'lib/zebra/epl/printable.rb', line 10

def position
  @position
end

#xObject (readonly)

Returns the value of attribute x.



10
11
12
# File 'lib/zebra/epl/printable.rb', line 10

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



10
11
12
# File 'lib/zebra/epl/printable.rb', line 10

def y
  @y
end

Instance Method Details

#initialize(options = {}) ⇒ Object



13
14
15
# File 'lib/zebra/epl/printable.rb', line 13

def initialize(options = {})
  options.each_pair { |attribute, value| self.__send__ "#{attribute}=", value }
end

#rotationObject



26
27
28
# File 'lib/zebra/epl/printable.rb', line 26

def rotation
  @rotation || Rotation::NO_ROTATION
end

#rotation=(rot) ⇒ Object



21
22
23
24
# File 'lib/zebra/epl/printable.rb', line 21

def rotation=(rot)
  Rotation.validate_rotation rot
  @rotation = rot
end